diff --git a/Makefile b/Makefile index f8dfbb24c..c009efba3 100644 --- a/Makefile +++ b/Makefile @@ -163,6 +163,7 @@ PLUGIN_PROTOS= \ # Protos that are used by the conformance test runner. CONFORMANCE_PROTOS= \ Protos/conformance/conformance.proto \ + Protos/google/protobuf/test_messages_proto2.proto \ Protos/google/protobuf/test_messages_proto3.proto SWIFT_DESCRIPTOR_TEST_PROTOS= \ diff --git a/Protos/conformance/conformance.proto b/Protos/conformance/conformance.proto index 18e4b7bca..525140e94 100644 --- a/Protos/conformance/conformance.proto +++ b/Protos/conformance/conformance.proto @@ -77,6 +77,11 @@ message ConformanceRequest { // Which format should the testee serialize its message to? WireFormat requested_output_format = 3; + + // The full name for the test message to use; for the moment, either: + // protobuf_test_messages.proto3.TestAllTypesProto3 or + // protobuf_test_messages.proto2.TestAllTypesProto2. + string message_type = 4; } // Represents a single test case's output. diff --git a/Protos/google/protobuf/descriptor.proto b/Protos/google/protobuf/descriptor.proto index c7fbaaf64..70b82a4dc 100644 --- a/Protos/google/protobuf/descriptor.proto +++ b/Protos/google/protobuf/descriptor.proto @@ -351,6 +351,7 @@ message FileOptions { optional bool cc_generic_services = 16 [default=false]; optional bool java_generic_services = 17 [default=false]; optional bool py_generic_services = 18 [default=false]; + optional bool php_generic_services = 19 [default=false]; // Is this file deprecated? // Depending on the target platform, this can emit Deprecated annotations diff --git a/Protos/google/protobuf/test_messages_proto2.proto b/Protos/google/protobuf/test_messages_proto2.proto new file mode 100644 index 000000000..cbe0d1708 --- /dev/null +++ b/Protos/google/protobuf/test_messages_proto2.proto @@ -0,0 +1,216 @@ +// 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 proto2 messages. This test schema is used by: +// +// - conformance tests +// + +syntax = "proto2"; + +package protobuf_test_messages.proto2; +option java_package = "com.google.protobuf_test_messages.proto2"; + +// This is the default, but we specify it here explicitly. +option optimize_for = SPEED; + +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 TestAllTypesProto2 { + message NestedMessage { + optional int32 a = 1; + optional TestAllTypesProto2 corecursive = 2; + } + + enum NestedEnum { + FOO = 0; + BAR = 1; + BAZ = 2; + NEG = -1; // Intentionally negative. + } + + // Singular + optional int32 optional_int32 = 1; + optional int64 optional_int64 = 2; + optional uint32 optional_uint32 = 3; + optional uint64 optional_uint64 = 4; + optional sint32 optional_sint32 = 5; + optional sint64 optional_sint64 = 6; + optional fixed32 optional_fixed32 = 7; + optional fixed64 optional_fixed64 = 8; + optional sfixed32 optional_sfixed32 = 9; + optional sfixed64 optional_sfixed64 = 10; + optional float optional_float = 11; + optional double optional_double = 12; + optional bool optional_bool = 13; + optional string optional_string = 14; + optional bytes optional_bytes = 15; + + optional NestedMessage optional_nested_message = 18; + optional ForeignMessage optional_foreign_message = 19; + + optional NestedEnum optional_nested_enum = 21; + optional ForeignEnum optional_foreign_enum = 22; + + optional string optional_string_piece = 24 [ctype=STRING_PIECE]; + optional string optional_cord = 25 [ctype=CORD]; + + optional TestAllTypesProto2 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 map_sfixed32_sfixed32 = 64; + map 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; + } + + // extensions + extensions 120 to 200; + + // groups + optional group Data = 201 { + optional int32 group_int32 = 202; + optional uint32 group_uint32 = 203; + }; + + // Test field-name-to-JSON-name convention. + // (protobuf says names can be any valid C/C++ identifier.) + optional int32 fieldname1 = 401; + optional int32 field_name2 = 402; + optional int32 _field_name3 = 403; + optional int32 field__name4_ = 404; + optional int32 field0name5 = 405; + optional int32 field_0_name6 = 406; + optional int32 fieldName7 = 407; + optional int32 FieldName8 = 408; + optional int32 field_Name9 = 409; + optional int32 Field_Name10 = 410; + optional int32 FIELD_NAME11 = 411; + optional int32 FIELD_name12 = 412; + optional int32 __field_name13 = 413; + optional int32 __Field_name14 = 414; + optional int32 field__name15 = 415; + optional int32 field__Name16 = 416; + optional int32 field_name17__ = 417; + optional int32 Field_name18__ = 418; + + // message_set test case. + message MessageSetCorrect { + option message_set_wire_format = true; + extensions 4 to max; + } + + message MessageSetCorrectExtension1 { + extend MessageSetCorrect { + optional MessageSetCorrectExtension1 message_set_extension = 1547769; + } + optional string str = 25; + } + + message MessageSetCorrectExtension2 { + extend MessageSetCorrect { + optional MessageSetCorrectExtension2 message_set_extension = 4135312; + } + optional int32 i = 9; + } +} + +message ForeignMessage { + optional int32 c = 1; +} + +enum ForeignEnum { + FOREIGN_FOO = 0; + FOREIGN_BAR = 1; + FOREIGN_BAZ = 2; +} + +extend TestAllTypesProto2 { + optional int32 extension_int32 = 120; +} diff --git a/Protos/google/protobuf/test_messages_proto3.proto b/Protos/google/protobuf/test_messages_proto3.proto index 79230334d..84b9da992 100644 --- a/Protos/google/protobuf/test_messages_proto3.proto +++ b/Protos/google/protobuf/test_messages_proto3.proto @@ -39,6 +39,7 @@ syntax = "proto3"; package protobuf_test_messages.proto3; option java_package = "com.google.protobuf_test_messages.proto3"; +option objc_class_prefix = "Proto3"; // This is the default, but we specify it here explicitly. option optimize_for = SPEED; @@ -59,10 +60,10 @@ option cc_enable_arenas = true; // 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 TestAllTypesProto3 { message NestedMessage { int32 a = 1; - TestAllTypes corecursive = 2; + TestAllTypesProto3 corecursive = 2; } enum NestedEnum { @@ -98,7 +99,7 @@ message TestAllTypes { string optional_string_piece = 24 [ctype=STRING_PIECE]; string optional_cord = 25 [ctype=CORD]; - TestAllTypes recursive_message = 27; + TestAllTypesProto3 recursive_message = 27; // Repeated repeated int32 repeated_int32 = 31; diff --git a/Reference/conformance/conformance.pb.swift b/Reference/conformance/conformance.pb.swift index 8dadc271d..1e554ba16 100644 --- a/Reference/conformance/conformance.pb.swift +++ b/Reference/conformance/conformance.pb.swift @@ -116,6 +116,11 @@ struct Conformance_ConformanceRequest: SwiftProtobuf.Message { /// Which format should the testee serialize its message to? var requestedOutputFormat: Conformance_WireFormat = .unspecified + /// The full name for the test message to use; for the moment, either: + /// protobuf_test_messages.proto3.TestAllTypesProto3 or + /// protobuf_test_messages.proto2.TestAllTypesProto2. + var messageType: String = String() + var unknownFields = SwiftProtobuf.UnknownStorage() /// The payload (whether protobuf of JSON) is always for a @@ -158,6 +163,7 @@ struct Conformance_ConformanceRequest: SwiftProtobuf.Message { try decoder.decodeSingularStringField(value: &v) if let v = v {self.payload = .jsonPayload(v)} case 3: try decoder.decodeSingularEnumField(value: &self.requestedOutputFormat) + case 4: try decoder.decodeSingularStringField(value: &self.messageType) default: break } } @@ -178,6 +184,9 @@ struct Conformance_ConformanceRequest: SwiftProtobuf.Message { if self.requestedOutputFormat != .unspecified { try visitor.visitSingularEnumField(value: self.requestedOutputFormat, fieldNumber: 3) } + if !self.messageType.isEmpty { + try visitor.visitSingularStringField(value: self.messageType, fieldNumber: 4) + } try unknownFields.traverse(visitor: &visitor) } } @@ -378,11 +387,13 @@ extension Conformance_ConformanceRequest: SwiftProtobuf._MessageImplementationBa 1: .standard(proto: "protobuf_payload"), 2: .standard(proto: "json_payload"), 3: .standard(proto: "requested_output_format"), + 4: .standard(proto: "message_type"), ] func _protobuf_generated_isEqualTo(other: Conformance_ConformanceRequest) -> Bool { if self.payload != other.payload {return false} if self.requestedOutputFormat != other.requestedOutputFormat {return false} + if self.messageType != other.messageType {return false} if unknownFields != other.unknownFields {return false} return true } diff --git a/Reference/google/protobuf/descriptor.pb.swift b/Reference/google/protobuf/descriptor.pb.swift index e3df30a89..1412a888d 100644 --- a/Reference/google/protobuf/descriptor.pb.swift +++ b/Reference/google/protobuf/descriptor.pb.swift @@ -1437,6 +1437,15 @@ struct Google_Protobuf_FileOptions: SwiftProtobuf.Message, SwiftProtobuf.Extensi /// Clears the value of `pyGenericServices`. Subsequent reads from it will return its default value. mutating func clearPyGenericServices() {_storage._pyGenericServices = nil} + var phpGenericServices: Bool { + get {return _storage._phpGenericServices ?? false} + set {_uniqueStorage()._phpGenericServices = newValue} + } + /// Returns true if `phpGenericServices` has been explicitly set. + var hasPhpGenericServices: Bool {return _storage._phpGenericServices != nil} + /// Clears the value of `phpGenericServices`. Subsequent reads from it will return its default value. + mutating func clearPhpGenericServices() {_storage._phpGenericServices = nil} + /// 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 @@ -1589,6 +1598,7 @@ struct Google_Protobuf_FileOptions: SwiftProtobuf.Message, SwiftProtobuf.Extensi case 16: try decoder.decodeSingularBoolField(value: &_storage._ccGenericServices) case 17: try decoder.decodeSingularBoolField(value: &_storage._javaGenericServices) case 18: try decoder.decodeSingularBoolField(value: &_storage._pyGenericServices) + case 19: try decoder.decodeSingularBoolField(value: &_storage._phpGenericServices) case 20: try decoder.decodeSingularBoolField(value: &_storage._javaGenerateEqualsAndHash) case 23: try decoder.decodeSingularBoolField(value: &_storage._deprecated) case 27: try decoder.decodeSingularBoolField(value: &_storage._javaStringCheckUtf8) @@ -1637,6 +1647,9 @@ struct Google_Protobuf_FileOptions: SwiftProtobuf.Message, SwiftProtobuf.Extensi if let v = _storage._pyGenericServices { try visitor.visitSingularBoolField(value: v, fieldNumber: 18) } + if let v = _storage._phpGenericServices { + try visitor.visitSingularBoolField(value: v, fieldNumber: 19) + } if let v = _storage._javaGenerateEqualsAndHash { try visitor.visitSingularBoolField(value: v, fieldNumber: 20) } @@ -3555,6 +3568,7 @@ extension Google_Protobuf_FileOptions: SwiftProtobuf._MessageImplementationBase, 16: .standard(proto: "cc_generic_services"), 17: .standard(proto: "java_generic_services"), 18: .standard(proto: "py_generic_services"), + 19: .standard(proto: "php_generic_services"), 23: .same(proto: "deprecated"), 31: .standard(proto: "cc_enable_arenas"), 36: .standard(proto: "objc_class_prefix"), @@ -3576,6 +3590,7 @@ extension Google_Protobuf_FileOptions: SwiftProtobuf._MessageImplementationBase, var _ccGenericServices: Bool? = nil var _javaGenericServices: Bool? = nil var _pyGenericServices: Bool? = nil + var _phpGenericServices: Bool? = nil var _deprecated: Bool? = nil var _ccEnableArenas: Bool? = nil var _objcClassPrefix: String? = nil @@ -3600,6 +3615,7 @@ extension Google_Protobuf_FileOptions: SwiftProtobuf._MessageImplementationBase, _ccGenericServices = source._ccGenericServices _javaGenericServices = source._javaGenericServices _pyGenericServices = source._pyGenericServices + _phpGenericServices = source._phpGenericServices _deprecated = source._deprecated _ccEnableArenas = source._ccEnableArenas _objcClassPrefix = source._objcClassPrefix @@ -3633,6 +3649,7 @@ extension Google_Protobuf_FileOptions: SwiftProtobuf._MessageImplementationBase, if _storage._ccGenericServices != other_storage._ccGenericServices {return false} if _storage._javaGenericServices != other_storage._javaGenericServices {return false} if _storage._pyGenericServices != other_storage._pyGenericServices {return false} + if _storage._phpGenericServices != other_storage._phpGenericServices {return false} if _storage._deprecated != other_storage._deprecated {return false} if _storage._ccEnableArenas != other_storage._ccEnableArenas {return false} if _storage._objcClassPrefix != other_storage._objcClassPrefix {return false} diff --git a/Reference/google/protobuf/test_messages_proto2.pb.swift b/Reference/google/protobuf/test_messages_proto2.pb.swift new file mode 100644 index 000000000..d4a246eb1 --- /dev/null +++ b/Reference/google/protobuf/test_messages_proto2.pb.swift @@ -0,0 +1,2117 @@ +// DO NOT EDIT. +// +// Generated by the Swift generator plugin for the protocol buffer compiler. +// Source: google/protobuf/test_messages_proto2.proto +// +// For information on using the generated types, please see the documenation: +// https://github.com/apple/swift-protobuf/ + +// 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 proto2 messages. This test schema is used by: +// +// - conformance tests + +import Foundation +import SwiftProtobuf + +// If the compiler emits an error on this type, it is because this file +// was generated by a version of the `protoc` Swift plug-in that is +// incompatible with the version of SwiftProtobuf to which you are linking. +// Please ensure that your are building against the same version of the API +// that was used to generate this file. +fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { + struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} + typealias Version = _2 +} + +enum ProtobufTestMessages_Proto2_ForeignEnum: SwiftProtobuf.Enum { + typealias RawValue = Int + case foreignFoo // = 0 + case foreignBar // = 1 + case foreignBaz // = 2 + + init() { + self = .foreignFoo + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .foreignFoo + case 1: self = .foreignBar + case 2: self = .foreignBaz + default: return nil + } + } + + var rawValue: Int { + switch self { + case .foreignFoo: return 0 + case .foreignBar: return 1 + case .foreignBaz: return 2 + } + } + +} + +/// 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. +struct ProtobufTestMessages_Proto2_TestAllTypesProto2: SwiftProtobuf.Message, SwiftProtobuf.ExtensibleMessage { + static let protoMessageName: String = _protobuf_package + ".TestAllTypesProto2" + + /// Singular + var optionalInt32: Int32 { + get {return _storage._optionalInt32 ?? 0} + set {_uniqueStorage()._optionalInt32 = newValue} + } + /// Returns true if `optionalInt32` has been explicitly set. + var hasOptionalInt32: Bool {return _storage._optionalInt32 != nil} + /// Clears the value of `optionalInt32`. Subsequent reads from it will return its default value. + mutating func clearOptionalInt32() {_storage._optionalInt32 = nil} + + var optionalInt64: Int64 { + get {return _storage._optionalInt64 ?? 0} + set {_uniqueStorage()._optionalInt64 = newValue} + } + /// Returns true if `optionalInt64` has been explicitly set. + var hasOptionalInt64: Bool {return _storage._optionalInt64 != nil} + /// Clears the value of `optionalInt64`. Subsequent reads from it will return its default value. + mutating func clearOptionalInt64() {_storage._optionalInt64 = nil} + + var optionalUint32: UInt32 { + get {return _storage._optionalUint32 ?? 0} + set {_uniqueStorage()._optionalUint32 = newValue} + } + /// Returns true if `optionalUint32` has been explicitly set. + var hasOptionalUint32: Bool {return _storage._optionalUint32 != nil} + /// Clears the value of `optionalUint32`. Subsequent reads from it will return its default value. + mutating func clearOptionalUint32() {_storage._optionalUint32 = nil} + + var optionalUint64: UInt64 { + get {return _storage._optionalUint64 ?? 0} + set {_uniqueStorage()._optionalUint64 = newValue} + } + /// Returns true if `optionalUint64` has been explicitly set. + var hasOptionalUint64: Bool {return _storage._optionalUint64 != nil} + /// Clears the value of `optionalUint64`. Subsequent reads from it will return its default value. + mutating func clearOptionalUint64() {_storage._optionalUint64 = nil} + + var optionalSint32: Int32 { + get {return _storage._optionalSint32 ?? 0} + set {_uniqueStorage()._optionalSint32 = newValue} + } + /// Returns true if `optionalSint32` has been explicitly set. + var hasOptionalSint32: Bool {return _storage._optionalSint32 != nil} + /// Clears the value of `optionalSint32`. Subsequent reads from it will return its default value. + mutating func clearOptionalSint32() {_storage._optionalSint32 = nil} + + var optionalSint64: Int64 { + get {return _storage._optionalSint64 ?? 0} + set {_uniqueStorage()._optionalSint64 = newValue} + } + /// Returns true if `optionalSint64` has been explicitly set. + var hasOptionalSint64: Bool {return _storage._optionalSint64 != nil} + /// Clears the value of `optionalSint64`. Subsequent reads from it will return its default value. + mutating func clearOptionalSint64() {_storage._optionalSint64 = nil} + + var optionalFixed32: UInt32 { + get {return _storage._optionalFixed32 ?? 0} + set {_uniqueStorage()._optionalFixed32 = newValue} + } + /// Returns true if `optionalFixed32` has been explicitly set. + var hasOptionalFixed32: Bool {return _storage._optionalFixed32 != nil} + /// Clears the value of `optionalFixed32`. Subsequent reads from it will return its default value. + mutating func clearOptionalFixed32() {_storage._optionalFixed32 = nil} + + var optionalFixed64: UInt64 { + get {return _storage._optionalFixed64 ?? 0} + set {_uniqueStorage()._optionalFixed64 = newValue} + } + /// Returns true if `optionalFixed64` has been explicitly set. + var hasOptionalFixed64: Bool {return _storage._optionalFixed64 != nil} + /// Clears the value of `optionalFixed64`. Subsequent reads from it will return its default value. + mutating func clearOptionalFixed64() {_storage._optionalFixed64 = nil} + + var optionalSfixed32: Int32 { + get {return _storage._optionalSfixed32 ?? 0} + set {_uniqueStorage()._optionalSfixed32 = newValue} + } + /// Returns true if `optionalSfixed32` has been explicitly set. + var hasOptionalSfixed32: Bool {return _storage._optionalSfixed32 != nil} + /// Clears the value of `optionalSfixed32`. Subsequent reads from it will return its default value. + mutating func clearOptionalSfixed32() {_storage._optionalSfixed32 = nil} + + var optionalSfixed64: Int64 { + get {return _storage._optionalSfixed64 ?? 0} + set {_uniqueStorage()._optionalSfixed64 = newValue} + } + /// Returns true if `optionalSfixed64` has been explicitly set. + var hasOptionalSfixed64: Bool {return _storage._optionalSfixed64 != nil} + /// Clears the value of `optionalSfixed64`. Subsequent reads from it will return its default value. + mutating func clearOptionalSfixed64() {_storage._optionalSfixed64 = nil} + + var optionalFloat: Float { + get {return _storage._optionalFloat ?? 0} + set {_uniqueStorage()._optionalFloat = newValue} + } + /// Returns true if `optionalFloat` has been explicitly set. + var hasOptionalFloat: Bool {return _storage._optionalFloat != nil} + /// Clears the value of `optionalFloat`. Subsequent reads from it will return its default value. + mutating func clearOptionalFloat() {_storage._optionalFloat = nil} + + var optionalDouble: Double { + get {return _storage._optionalDouble ?? 0} + set {_uniqueStorage()._optionalDouble = newValue} + } + /// Returns true if `optionalDouble` has been explicitly set. + var hasOptionalDouble: Bool {return _storage._optionalDouble != nil} + /// Clears the value of `optionalDouble`. Subsequent reads from it will return its default value. + mutating func clearOptionalDouble() {_storage._optionalDouble = nil} + + var optionalBool: Bool { + get {return _storage._optionalBool ?? false} + set {_uniqueStorage()._optionalBool = newValue} + } + /// Returns true if `optionalBool` has been explicitly set. + var hasOptionalBool: Bool {return _storage._optionalBool != nil} + /// Clears the value of `optionalBool`. Subsequent reads from it will return its default value. + mutating func clearOptionalBool() {_storage._optionalBool = nil} + + var optionalString: String { + get {return _storage._optionalString ?? String()} + set {_uniqueStorage()._optionalString = newValue} + } + /// Returns true if `optionalString` has been explicitly set. + var hasOptionalString: Bool {return _storage._optionalString != nil} + /// Clears the value of `optionalString`. Subsequent reads from it will return its default value. + mutating func clearOptionalString() {_storage._optionalString = nil} + + var optionalBytes: Data { + get {return _storage._optionalBytes ?? SwiftProtobuf.Internal.emptyData} + set {_uniqueStorage()._optionalBytes = newValue} + } + /// Returns true if `optionalBytes` has been explicitly set. + var hasOptionalBytes: Bool {return _storage._optionalBytes != nil} + /// Clears the value of `optionalBytes`. Subsequent reads from it will return its default value. + mutating func clearOptionalBytes() {_storage._optionalBytes = nil} + + var optionalNestedMessage: ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedMessage { + get {return _storage._optionalNestedMessage ?? ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedMessage()} + set {_uniqueStorage()._optionalNestedMessage = newValue} + } + /// Returns true if `optionalNestedMessage` has been explicitly set. + var hasOptionalNestedMessage: Bool {return _storage._optionalNestedMessage != nil} + /// Clears the value of `optionalNestedMessage`. Subsequent reads from it will return its default value. + mutating func clearOptionalNestedMessage() {_storage._optionalNestedMessage = nil} + + var optionalForeignMessage: ProtobufTestMessages_Proto2_ForeignMessage { + get {return _storage._optionalForeignMessage ?? ProtobufTestMessages_Proto2_ForeignMessage()} + set {_uniqueStorage()._optionalForeignMessage = newValue} + } + /// Returns true if `optionalForeignMessage` has been explicitly set. + var hasOptionalForeignMessage: Bool {return _storage._optionalForeignMessage != nil} + /// Clears the value of `optionalForeignMessage`. Subsequent reads from it will return its default value. + mutating func clearOptionalForeignMessage() {_storage._optionalForeignMessage = nil} + + var optionalNestedEnum: ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedEnum { + get {return _storage._optionalNestedEnum ?? .foo} + set {_uniqueStorage()._optionalNestedEnum = newValue} + } + /// Returns true if `optionalNestedEnum` has been explicitly set. + var hasOptionalNestedEnum: Bool {return _storage._optionalNestedEnum != nil} + /// Clears the value of `optionalNestedEnum`. Subsequent reads from it will return its default value. + mutating func clearOptionalNestedEnum() {_storage._optionalNestedEnum = nil} + + var optionalForeignEnum: ProtobufTestMessages_Proto2_ForeignEnum { + get {return _storage._optionalForeignEnum ?? .foreignFoo} + set {_uniqueStorage()._optionalForeignEnum = newValue} + } + /// Returns true if `optionalForeignEnum` has been explicitly set. + var hasOptionalForeignEnum: Bool {return _storage._optionalForeignEnum != nil} + /// Clears the value of `optionalForeignEnum`. Subsequent reads from it will return its default value. + mutating func clearOptionalForeignEnum() {_storage._optionalForeignEnum = nil} + + var optionalStringPiece: String { + get {return _storage._optionalStringPiece ?? String()} + set {_uniqueStorage()._optionalStringPiece = newValue} + } + /// Returns true if `optionalStringPiece` has been explicitly set. + var hasOptionalStringPiece: Bool {return _storage._optionalStringPiece != nil} + /// Clears the value of `optionalStringPiece`. Subsequent reads from it will return its default value. + mutating func clearOptionalStringPiece() {_storage._optionalStringPiece = nil} + + var optionalCord: String { + get {return _storage._optionalCord ?? String()} + set {_uniqueStorage()._optionalCord = newValue} + } + /// Returns true if `optionalCord` has been explicitly set. + var hasOptionalCord: Bool {return _storage._optionalCord != nil} + /// Clears the value of `optionalCord`. Subsequent reads from it will return its default value. + mutating func clearOptionalCord() {_storage._optionalCord = nil} + + var recursiveMessage: ProtobufTestMessages_Proto2_TestAllTypesProto2 { + get {return _storage._recursiveMessage ?? ProtobufTestMessages_Proto2_TestAllTypesProto2()} + set {_uniqueStorage()._recursiveMessage = newValue} + } + /// Returns true if `recursiveMessage` has been explicitly set. + var hasRecursiveMessage: Bool {return _storage._recursiveMessage != nil} + /// Clears the value of `recursiveMessage`. Subsequent reads from it will return its default value. + mutating func clearRecursiveMessage() {_storage._recursiveMessage = nil} + + /// Repeated + var repeatedInt32: [Int32] { + get {return _storage._repeatedInt32} + set {_uniqueStorage()._repeatedInt32 = newValue} + } + + var repeatedInt64: [Int64] { + get {return _storage._repeatedInt64} + set {_uniqueStorage()._repeatedInt64 = newValue} + } + + var repeatedUint32: [UInt32] { + get {return _storage._repeatedUint32} + set {_uniqueStorage()._repeatedUint32 = newValue} + } + + var repeatedUint64: [UInt64] { + get {return _storage._repeatedUint64} + set {_uniqueStorage()._repeatedUint64 = newValue} + } + + var repeatedSint32: [Int32] { + get {return _storage._repeatedSint32} + set {_uniqueStorage()._repeatedSint32 = newValue} + } + + var repeatedSint64: [Int64] { + get {return _storage._repeatedSint64} + set {_uniqueStorage()._repeatedSint64 = newValue} + } + + var repeatedFixed32: [UInt32] { + get {return _storage._repeatedFixed32} + set {_uniqueStorage()._repeatedFixed32 = newValue} + } + + var repeatedFixed64: [UInt64] { + get {return _storage._repeatedFixed64} + set {_uniqueStorage()._repeatedFixed64 = newValue} + } + + var repeatedSfixed32: [Int32] { + get {return _storage._repeatedSfixed32} + set {_uniqueStorage()._repeatedSfixed32 = newValue} + } + + var repeatedSfixed64: [Int64] { + get {return _storage._repeatedSfixed64} + set {_uniqueStorage()._repeatedSfixed64 = newValue} + } + + var repeatedFloat: [Float] { + get {return _storage._repeatedFloat} + set {_uniqueStorage()._repeatedFloat = newValue} + } + + var repeatedDouble: [Double] { + get {return _storage._repeatedDouble} + set {_uniqueStorage()._repeatedDouble = newValue} + } + + var repeatedBool: [Bool] { + get {return _storage._repeatedBool} + set {_uniqueStorage()._repeatedBool = newValue} + } + + var repeatedString: [String] { + get {return _storage._repeatedString} + set {_uniqueStorage()._repeatedString = newValue} + } + + var repeatedBytes: [Data] { + get {return _storage._repeatedBytes} + set {_uniqueStorage()._repeatedBytes = newValue} + } + + var repeatedNestedMessage: [ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedMessage] { + get {return _storage._repeatedNestedMessage} + set {_uniqueStorage()._repeatedNestedMessage = newValue} + } + + var repeatedForeignMessage: [ProtobufTestMessages_Proto2_ForeignMessage] { + get {return _storage._repeatedForeignMessage} + set {_uniqueStorage()._repeatedForeignMessage = newValue} + } + + var repeatedNestedEnum: [ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedEnum] { + get {return _storage._repeatedNestedEnum} + set {_uniqueStorage()._repeatedNestedEnum = newValue} + } + + var repeatedForeignEnum: [ProtobufTestMessages_Proto2_ForeignEnum] { + get {return _storage._repeatedForeignEnum} + set {_uniqueStorage()._repeatedForeignEnum = newValue} + } + + var repeatedStringPiece: [String] { + get {return _storage._repeatedStringPiece} + set {_uniqueStorage()._repeatedStringPiece = newValue} + } + + var repeatedCord: [String] { + get {return _storage._repeatedCord} + set {_uniqueStorage()._repeatedCord = newValue} + } + + /// Map + var mapInt32Int32: Dictionary { + get {return _storage._mapInt32Int32} + set {_uniqueStorage()._mapInt32Int32 = newValue} + } + + var mapInt64Int64: Dictionary { + get {return _storage._mapInt64Int64} + set {_uniqueStorage()._mapInt64Int64 = newValue} + } + + var mapUint32Uint32: Dictionary { + get {return _storage._mapUint32Uint32} + set {_uniqueStorage()._mapUint32Uint32 = newValue} + } + + var mapUint64Uint64: Dictionary { + get {return _storage._mapUint64Uint64} + set {_uniqueStorage()._mapUint64Uint64 = newValue} + } + + var mapSint32Sint32: Dictionary { + get {return _storage._mapSint32Sint32} + set {_uniqueStorage()._mapSint32Sint32 = newValue} + } + + var mapSint64Sint64: Dictionary { + get {return _storage._mapSint64Sint64} + set {_uniqueStorage()._mapSint64Sint64 = newValue} + } + + var mapFixed32Fixed32: Dictionary { + get {return _storage._mapFixed32Fixed32} + set {_uniqueStorage()._mapFixed32Fixed32 = newValue} + } + + var mapFixed64Fixed64: Dictionary { + get {return _storage._mapFixed64Fixed64} + set {_uniqueStorage()._mapFixed64Fixed64 = newValue} + } + + var mapSfixed32Sfixed32: Dictionary { + get {return _storage._mapSfixed32Sfixed32} + set {_uniqueStorage()._mapSfixed32Sfixed32 = newValue} + } + + var mapSfixed64Sfixed64: Dictionary { + get {return _storage._mapSfixed64Sfixed64} + set {_uniqueStorage()._mapSfixed64Sfixed64 = newValue} + } + + var mapInt32Float: Dictionary { + get {return _storage._mapInt32Float} + set {_uniqueStorage()._mapInt32Float = newValue} + } + + var mapInt32Double: Dictionary { + get {return _storage._mapInt32Double} + set {_uniqueStorage()._mapInt32Double = newValue} + } + + var mapBoolBool: Dictionary { + get {return _storage._mapBoolBool} + set {_uniqueStorage()._mapBoolBool = newValue} + } + + var mapStringString: Dictionary { + get {return _storage._mapStringString} + set {_uniqueStorage()._mapStringString = newValue} + } + + var mapStringBytes: Dictionary { + get {return _storage._mapStringBytes} + set {_uniqueStorage()._mapStringBytes = newValue} + } + + var mapStringNestedMessage: Dictionary { + get {return _storage._mapStringNestedMessage} + set {_uniqueStorage()._mapStringNestedMessage = newValue} + } + + var mapStringForeignMessage: Dictionary { + get {return _storage._mapStringForeignMessage} + set {_uniqueStorage()._mapStringForeignMessage = newValue} + } + + var mapStringNestedEnum: Dictionary { + get {return _storage._mapStringNestedEnum} + set {_uniqueStorage()._mapStringNestedEnum = newValue} + } + + var mapStringForeignEnum: Dictionary { + get {return _storage._mapStringForeignEnum} + set {_uniqueStorage()._mapStringForeignEnum = newValue} + } + + var oneofField: OneOf_OneofField? { + get {return _storage._oneofField} + set {_uniqueStorage()._oneofField = newValue} + } + + var oneofUint32: UInt32 { + get { + if case .oneofUint32(let v)? = _storage._oneofField {return v} + return 0 + } + set {_uniqueStorage()._oneofField = .oneofUint32(newValue)} + } + + var oneofNestedMessage: ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedMessage { + get { + if case .oneofNestedMessage(let v)? = _storage._oneofField {return v} + return ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedMessage() + } + set {_uniqueStorage()._oneofField = .oneofNestedMessage(newValue)} + } + + var oneofString: String { + get { + if case .oneofString(let v)? = _storage._oneofField {return v} + return String() + } + set {_uniqueStorage()._oneofField = .oneofString(newValue)} + } + + var oneofBytes: Data { + get { + if case .oneofBytes(let v)? = _storage._oneofField {return v} + return SwiftProtobuf.Internal.emptyData + } + set {_uniqueStorage()._oneofField = .oneofBytes(newValue)} + } + + var oneofBool: Bool { + get { + if case .oneofBool(let v)? = _storage._oneofField {return v} + return false + } + set {_uniqueStorage()._oneofField = .oneofBool(newValue)} + } + + var oneofUint64: UInt64 { + get { + if case .oneofUint64(let v)? = _storage._oneofField {return v} + return 0 + } + set {_uniqueStorage()._oneofField = .oneofUint64(newValue)} + } + + var oneofFloat: Float { + get { + if case .oneofFloat(let v)? = _storage._oneofField {return v} + return 0 + } + set {_uniqueStorage()._oneofField = .oneofFloat(newValue)} + } + + var oneofDouble: Double { + get { + if case .oneofDouble(let v)? = _storage._oneofField {return v} + return 0 + } + set {_uniqueStorage()._oneofField = .oneofDouble(newValue)} + } + + var oneofEnum: ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedEnum { + get { + if case .oneofEnum(let v)? = _storage._oneofField {return v} + return .foo + } + set {_uniqueStorage()._oneofField = .oneofEnum(newValue)} + } + + var data: ProtobufTestMessages_Proto2_TestAllTypesProto2.DataMessage { + get {return _storage._data ?? ProtobufTestMessages_Proto2_TestAllTypesProto2.DataMessage()} + set {_uniqueStorage()._data = newValue} + } + /// Returns true if `data` has been explicitly set. + var hasData: Bool {return _storage._data != nil} + /// Clears the value of `data`. Subsequent reads from it will return its default value. + mutating func clearData() {_storage._data = nil} + + /// Test field-name-to-JSON-name convention. + /// (protobuf says names can be any valid C/C++ identifier.) + var fieldname1: Int32 { + get {return _storage._fieldname1 ?? 0} + set {_uniqueStorage()._fieldname1 = newValue} + } + /// Returns true if `fieldname1` has been explicitly set. + var hasFieldname1: Bool {return _storage._fieldname1 != nil} + /// Clears the value of `fieldname1`. Subsequent reads from it will return its default value. + mutating func clearFieldname1() {_storage._fieldname1 = nil} + + var fieldName2: Int32 { + get {return _storage._fieldName2 ?? 0} + set {_uniqueStorage()._fieldName2 = newValue} + } + /// Returns true if `fieldName2` has been explicitly set. + var hasFieldName2: Bool {return _storage._fieldName2 != nil} + /// Clears the value of `fieldName2`. Subsequent reads from it will return its default value. + mutating func clearFieldName2() {_storage._fieldName2 = nil} + + var fieldName3: Int32 { + get {return _storage._fieldName3 ?? 0} + set {_uniqueStorage()._fieldName3 = newValue} + } + /// Returns true if `fieldName3` has been explicitly set. + var hasFieldName3: Bool {return _storage._fieldName3 != nil} + /// Clears the value of `fieldName3`. Subsequent reads from it will return its default value. + mutating func clearFieldName3() {_storage._fieldName3 = nil} + + var field_Name4_: Int32 { + get {return _storage._field_Name4_ ?? 0} + set {_uniqueStorage()._field_Name4_ = newValue} + } + /// Returns true if `field_Name4_` has been explicitly set. + var hasField_Name4_: Bool {return _storage._field_Name4_ != nil} + /// Clears the value of `field_Name4_`. Subsequent reads from it will return its default value. + mutating func clearField_Name4_() {_storage._field_Name4_ = nil} + + var field0Name5: Int32 { + get {return _storage._field0Name5 ?? 0} + set {_uniqueStorage()._field0Name5 = newValue} + } + /// Returns true if `field0Name5` has been explicitly set. + var hasField0Name5: Bool {return _storage._field0Name5 != nil} + /// Clears the value of `field0Name5`. Subsequent reads from it will return its default value. + mutating func clearField0Name5() {_storage._field0Name5 = nil} + + var field0Name6: Int32 { + get {return _storage._field0Name6 ?? 0} + set {_uniqueStorage()._field0Name6 = newValue} + } + /// Returns true if `field0Name6` has been explicitly set. + var hasField0Name6: Bool {return _storage._field0Name6 != nil} + /// Clears the value of `field0Name6`. Subsequent reads from it will return its default value. + mutating func clearField0Name6() {_storage._field0Name6 = nil} + + var fieldName7: Int32 { + get {return _storage._fieldName7 ?? 0} + set {_uniqueStorage()._fieldName7 = newValue} + } + /// Returns true if `fieldName7` has been explicitly set. + var hasFieldName7: Bool {return _storage._fieldName7 != nil} + /// Clears the value of `fieldName7`. Subsequent reads from it will return its default value. + mutating func clearFieldName7() {_storage._fieldName7 = nil} + + var fieldName8: Int32 { + get {return _storage._fieldName8 ?? 0} + set {_uniqueStorage()._fieldName8 = newValue} + } + /// Returns true if `fieldName8` has been explicitly set. + var hasFieldName8: Bool {return _storage._fieldName8 != nil} + /// Clears the value of `fieldName8`. Subsequent reads from it will return its default value. + mutating func clearFieldName8() {_storage._fieldName8 = nil} + + var fieldName9: Int32 { + get {return _storage._fieldName9 ?? 0} + set {_uniqueStorage()._fieldName9 = newValue} + } + /// Returns true if `fieldName9` has been explicitly set. + var hasFieldName9: Bool {return _storage._fieldName9 != nil} + /// Clears the value of `fieldName9`. Subsequent reads from it will return its default value. + mutating func clearFieldName9() {_storage._fieldName9 = nil} + + var fieldName10: Int32 { + get {return _storage._fieldName10 ?? 0} + set {_uniqueStorage()._fieldName10 = newValue} + } + /// Returns true if `fieldName10` has been explicitly set. + var hasFieldName10: Bool {return _storage._fieldName10 != nil} + /// Clears the value of `fieldName10`. Subsequent reads from it will return its default value. + mutating func clearFieldName10() {_storage._fieldName10 = nil} + + var fieldName11: Int32 { + get {return _storage._fieldName11 ?? 0} + set {_uniqueStorage()._fieldName11 = newValue} + } + /// Returns true if `fieldName11` has been explicitly set. + var hasFieldName11: Bool {return _storage._fieldName11 != nil} + /// Clears the value of `fieldName11`. Subsequent reads from it will return its default value. + mutating func clearFieldName11() {_storage._fieldName11 = nil} + + var fieldName12: Int32 { + get {return _storage._fieldName12 ?? 0} + set {_uniqueStorage()._fieldName12 = newValue} + } + /// Returns true if `fieldName12` has been explicitly set. + var hasFieldName12: Bool {return _storage._fieldName12 != nil} + /// Clears the value of `fieldName12`. Subsequent reads from it will return its default value. + mutating func clearFieldName12() {_storage._fieldName12 = nil} + + var _FieldName13: Int32 { + get {return _storage.__FieldName13 ?? 0} + set {_uniqueStorage().__FieldName13 = newValue} + } + /// Returns true if `_FieldName13` has been explicitly set. + var has_FieldName13: Bool {return _storage.__FieldName13 != nil} + /// Clears the value of `_FieldName13`. Subsequent reads from it will return its default value. + mutating func clear_FieldName13() {_storage.__FieldName13 = nil} + + var _FieldName14: Int32 { + get {return _storage.__FieldName14 ?? 0} + set {_uniqueStorage().__FieldName14 = newValue} + } + /// Returns true if `_FieldName14` has been explicitly set. + var has_FieldName14: Bool {return _storage.__FieldName14 != nil} + /// Clears the value of `_FieldName14`. Subsequent reads from it will return its default value. + mutating func clear_FieldName14() {_storage.__FieldName14 = nil} + + var field_Name15: Int32 { + get {return _storage._field_Name15 ?? 0} + set {_uniqueStorage()._field_Name15 = newValue} + } + /// Returns true if `field_Name15` has been explicitly set. + var hasField_Name15: Bool {return _storage._field_Name15 != nil} + /// Clears the value of `field_Name15`. Subsequent reads from it will return its default value. + mutating func clearField_Name15() {_storage._field_Name15 = nil} + + var field_Name16: Int32 { + get {return _storage._field_Name16 ?? 0} + set {_uniqueStorage()._field_Name16 = newValue} + } + /// Returns true if `field_Name16` has been explicitly set. + var hasField_Name16: Bool {return _storage._field_Name16 != nil} + /// Clears the value of `field_Name16`. Subsequent reads from it will return its default value. + mutating func clearField_Name16() {_storage._field_Name16 = nil} + + var fieldName17__: Int32 { + get {return _storage._fieldName17__ ?? 0} + set {_uniqueStorage()._fieldName17__ = newValue} + } + /// Returns true if `fieldName17__` has been explicitly set. + var hasFieldName17__: Bool {return _storage._fieldName17__ != nil} + /// Clears the value of `fieldName17__`. Subsequent reads from it will return its default value. + mutating func clearFieldName17__() {_storage._fieldName17__ = nil} + + var fieldName18__: Int32 { + get {return _storage._fieldName18__ ?? 0} + set {_uniqueStorage()._fieldName18__ = newValue} + } + /// Returns true if `fieldName18__` has been explicitly set. + var hasFieldName18__: Bool {return _storage._fieldName18__ != nil} + /// Clears the value of `fieldName18__`. Subsequent reads from it will return its default value. + mutating func clearFieldName18__() {_storage._fieldName18__ = nil} + + var unknownFields = SwiftProtobuf.UnknownStorage() + + enum OneOf_OneofField: Equatable { + case oneofUint32(UInt32) + case oneofNestedMessage(ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedMessage) + case oneofString(String) + case oneofBytes(Data) + case oneofBool(Bool) + case oneofUint64(UInt64) + case oneofFloat(Float) + case oneofDouble(Double) + case oneofEnum(ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedEnum) + + static func ==(lhs: ProtobufTestMessages_Proto2_TestAllTypesProto2.OneOf_OneofField, rhs: ProtobufTestMessages_Proto2_TestAllTypesProto2.OneOf_OneofField) -> Bool { + switch (lhs, rhs) { + case (.oneofUint32(let l), .oneofUint32(let r)): return l == r + case (.oneofNestedMessage(let l), .oneofNestedMessage(let r)): return l == r + case (.oneofString(let l), .oneofString(let r)): return l == r + case (.oneofBytes(let l), .oneofBytes(let r)): return l == r + case (.oneofBool(let l), .oneofBool(let r)): return l == r + case (.oneofUint64(let l), .oneofUint64(let r)): return l == r + case (.oneofFloat(let l), .oneofFloat(let r)): return l == r + case (.oneofDouble(let l), .oneofDouble(let r)): return l == r + case (.oneofEnum(let l), .oneofEnum(let r)): return l == r + default: return false + } + } + } + + enum NestedEnum: SwiftProtobuf.Enum { + typealias RawValue = Int + case foo // = 0 + case bar // = 1 + case baz // = 2 + + /// Intentionally negative. + case neg // = -1 + + init() { + self = .foo + } + + init?(rawValue: Int) { + switch rawValue { + case -1: self = .neg + case 0: self = .foo + case 1: self = .bar + case 2: self = .baz + default: return nil + } + } + + var rawValue: Int { + switch self { + case .neg: return -1 + case .foo: return 0 + case .bar: return 1 + case .baz: return 2 + } + } + + } + + struct NestedMessage: SwiftProtobuf.Message { + static let protoMessageName: String = ProtobufTestMessages_Proto2_TestAllTypesProto2.protoMessageName + ".NestedMessage" + + var a: Int32 { + get {return _storage._a ?? 0} + set {_uniqueStorage()._a = newValue} + } + /// Returns true if `a` has been explicitly set. + var hasA: Bool {return _storage._a != nil} + /// Clears the value of `a`. Subsequent reads from it will return its default value. + mutating func clearA() {_storage._a = nil} + + var corecursive: ProtobufTestMessages_Proto2_TestAllTypesProto2 { + get {return _storage._corecursive ?? ProtobufTestMessages_Proto2_TestAllTypesProto2()} + set {_uniqueStorage()._corecursive = newValue} + } + /// Returns true if `corecursive` has been explicitly set. + var hasCorecursive: Bool {return _storage._corecursive != nil} + /// Clears the value of `corecursive`. Subsequent reads from it will return its default value. + mutating func clearCorecursive() {_storage._corecursive = nil} + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + public var isInitialized: Bool { + return withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if let v = _storage._corecursive, !v.isInitialized {return false} + return true + } + } + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularInt32Field(value: &_storage._a) + case 2: try decoder.decodeSingularMessageField(value: &_storage._corecursive) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if let v = _storage._a { + try visitor.visitSingularInt32Field(value: v, fieldNumber: 1) + } + if let v = _storage._corecursive { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance + } + + /// groups + struct DataMessage: SwiftProtobuf.Message { + static let protoMessageName: String = ProtobufTestMessages_Proto2_TestAllTypesProto2.protoMessageName + ".Data" + + var groupInt32: Int32 { + get {return _groupInt32 ?? 0} + set {_groupInt32 = newValue} + } + /// Returns true if `groupInt32` has been explicitly set. + var hasGroupInt32: Bool {return self._groupInt32 != nil} + /// Clears the value of `groupInt32`. Subsequent reads from it will return its default value. + mutating func clearGroupInt32() {self._groupInt32 = nil} + + var groupUint32: UInt32 { + get {return _groupUint32 ?? 0} + set {_groupUint32 = newValue} + } + /// Returns true if `groupUint32` has been explicitly set. + var hasGroupUint32: Bool {return self._groupUint32 != nil} + /// Clears the value of `groupUint32`. Subsequent reads from it will return its default value. + mutating func clearGroupUint32() {self._groupUint32 = nil} + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 202: try decoder.decodeSingularInt32Field(value: &self._groupInt32) + case 203: try decoder.decodeSingularUInt32Field(value: &self._groupUint32) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + func traverse(visitor: inout V) throws { + if let v = self._groupInt32 { + try visitor.visitSingularInt32Field(value: v, fieldNumber: 202) + } + if let v = self._groupUint32 { + try visitor.visitSingularUInt32Field(value: v, fieldNumber: 203) + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _groupInt32: Int32? = nil + fileprivate var _groupUint32: UInt32? = nil + } + + /// message_set test case. + struct MessageSetCorrect: SwiftProtobuf.Message, SwiftProtobuf.ExtensibleMessage { + static let protoMessageName: String = ProtobufTestMessages_Proto2_TestAllTypesProto2.protoMessageName + ".MessageSetCorrect" + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + public var isInitialized: Bool { + if !_protobuf_extensionFieldValues.isInitialized {return false} + return true + } + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + mutating func decodeMessage(decoder: inout D) throws { + try decoder.decodeExtensionFieldsAsMessageSet(values: &_protobuf_extensionFieldValues, messageType: MessageSetCorrect.self) + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + func traverse(visitor: inout V) throws { + try visitor.visitExtensionFieldsAsMessageSet(fields: _protobuf_extensionFieldValues, start: 4, end: 2147483647) + try unknownFields.traverse(visitor: &visitor) + } + + var _protobuf_extensionFieldValues = SwiftProtobuf.ExtensionFieldValueSet() + } + + struct MessageSetCorrectExtension1: SwiftProtobuf.Message { + static let protoMessageName: String = ProtobufTestMessages_Proto2_TestAllTypesProto2.protoMessageName + ".MessageSetCorrectExtension1" + + var str: String { + get {return _str ?? String()} + set {_str = newValue} + } + /// Returns true if `str` has been explicitly set. + var hasStr: Bool {return self._str != nil} + /// Clears the value of `str`. Subsequent reads from it will return its default value. + mutating func clearStr() {self._str = nil} + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 25: try decoder.decodeSingularStringField(value: &self._str) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + func traverse(visitor: inout V) throws { + if let v = self._str { + try visitor.visitSingularStringField(value: v, fieldNumber: 25) + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _str: String? = nil + } + + struct MessageSetCorrectExtension2: SwiftProtobuf.Message { + static let protoMessageName: String = ProtobufTestMessages_Proto2_TestAllTypesProto2.protoMessageName + ".MessageSetCorrectExtension2" + + var i: Int32 { + get {return _i ?? 0} + set {_i = newValue} + } + /// Returns true if `i` has been explicitly set. + var hasI: Bool {return self._i != nil} + /// Clears the value of `i`. Subsequent reads from it will return its default value. + mutating func clearI() {self._i = nil} + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 9: try decoder.decodeSingularInt32Field(value: &self._i) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + func traverse(visitor: inout V) throws { + if let v = self._i { + try visitor.visitSingularInt32Field(value: v, fieldNumber: 9) + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _i: Int32? = nil + } + + init() {} + + public var isInitialized: Bool { + if !_protobuf_extensionFieldValues.isInitialized {return false} + return withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if let v = _storage._optionalNestedMessage, !v.isInitialized {return false} + if let v = _storage._recursiveMessage, !v.isInitialized {return false} + if !SwiftProtobuf.Internal.areAllInitialized(_storage._repeatedNestedMessage) {return false} + if !SwiftProtobuf.Internal.areAllInitialized(_storage._mapStringNestedMessage) {return false} + if case .oneofNestedMessage(let v)? = _storage._oneofField, !v.isInitialized {return false} + return true + } + } + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularInt32Field(value: &_storage._optionalInt32) + case 2: try decoder.decodeSingularInt64Field(value: &_storage._optionalInt64) + case 3: try decoder.decodeSingularUInt32Field(value: &_storage._optionalUint32) + case 4: try decoder.decodeSingularUInt64Field(value: &_storage._optionalUint64) + case 5: try decoder.decodeSingularSInt32Field(value: &_storage._optionalSint32) + case 6: try decoder.decodeSingularSInt64Field(value: &_storage._optionalSint64) + case 7: try decoder.decodeSingularFixed32Field(value: &_storage._optionalFixed32) + case 8: try decoder.decodeSingularFixed64Field(value: &_storage._optionalFixed64) + case 9: try decoder.decodeSingularSFixed32Field(value: &_storage._optionalSfixed32) + case 10: try decoder.decodeSingularSFixed64Field(value: &_storage._optionalSfixed64) + case 11: try decoder.decodeSingularFloatField(value: &_storage._optionalFloat) + case 12: try decoder.decodeSingularDoubleField(value: &_storage._optionalDouble) + case 13: try decoder.decodeSingularBoolField(value: &_storage._optionalBool) + case 14: try decoder.decodeSingularStringField(value: &_storage._optionalString) + case 15: try decoder.decodeSingularBytesField(value: &_storage._optionalBytes) + case 18: try decoder.decodeSingularMessageField(value: &_storage._optionalNestedMessage) + case 19: try decoder.decodeSingularMessageField(value: &_storage._optionalForeignMessage) + case 21: try decoder.decodeSingularEnumField(value: &_storage._optionalNestedEnum) + case 22: try decoder.decodeSingularEnumField(value: &_storage._optionalForeignEnum) + case 24: try decoder.decodeSingularStringField(value: &_storage._optionalStringPiece) + case 25: try decoder.decodeSingularStringField(value: &_storage._optionalCord) + case 27: try decoder.decodeSingularMessageField(value: &_storage._recursiveMessage) + case 31: try decoder.decodeRepeatedInt32Field(value: &_storage._repeatedInt32) + case 32: try decoder.decodeRepeatedInt64Field(value: &_storage._repeatedInt64) + case 33: try decoder.decodeRepeatedUInt32Field(value: &_storage._repeatedUint32) + case 34: try decoder.decodeRepeatedUInt64Field(value: &_storage._repeatedUint64) + case 35: try decoder.decodeRepeatedSInt32Field(value: &_storage._repeatedSint32) + case 36: try decoder.decodeRepeatedSInt64Field(value: &_storage._repeatedSint64) + case 37: try decoder.decodeRepeatedFixed32Field(value: &_storage._repeatedFixed32) + case 38: try decoder.decodeRepeatedFixed64Field(value: &_storage._repeatedFixed64) + case 39: try decoder.decodeRepeatedSFixed32Field(value: &_storage._repeatedSfixed32) + case 40: try decoder.decodeRepeatedSFixed64Field(value: &_storage._repeatedSfixed64) + case 41: try decoder.decodeRepeatedFloatField(value: &_storage._repeatedFloat) + case 42: try decoder.decodeRepeatedDoubleField(value: &_storage._repeatedDouble) + case 43: try decoder.decodeRepeatedBoolField(value: &_storage._repeatedBool) + case 44: try decoder.decodeRepeatedStringField(value: &_storage._repeatedString) + case 45: try decoder.decodeRepeatedBytesField(value: &_storage._repeatedBytes) + case 48: try decoder.decodeRepeatedMessageField(value: &_storage._repeatedNestedMessage) + case 49: try decoder.decodeRepeatedMessageField(value: &_storage._repeatedForeignMessage) + case 51: try decoder.decodeRepeatedEnumField(value: &_storage._repeatedNestedEnum) + case 52: try decoder.decodeRepeatedEnumField(value: &_storage._repeatedForeignEnum) + case 54: try decoder.decodeRepeatedStringField(value: &_storage._repeatedStringPiece) + case 55: try decoder.decodeRepeatedStringField(value: &_storage._repeatedCord) + case 56: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: &_storage._mapInt32Int32) + case 57: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: &_storage._mapInt64Int64) + case 58: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: &_storage._mapUint32Uint32) + case 59: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: &_storage._mapUint64Uint64) + case 60: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: &_storage._mapSint32Sint32) + case 61: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: &_storage._mapSint64Sint64) + case 62: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: &_storage._mapFixed32Fixed32) + case 63: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: &_storage._mapFixed64Fixed64) + case 64: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: &_storage._mapSfixed32Sfixed32) + case 65: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: &_storage._mapSfixed64Sfixed64) + case 66: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: &_storage._mapInt32Float) + case 67: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: &_storage._mapInt32Double) + case 68: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: &_storage._mapBoolBool) + case 69: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: &_storage._mapStringString) + case 70: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: &_storage._mapStringBytes) + case 71: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: &_storage._mapStringNestedMessage) + case 72: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: &_storage._mapStringForeignMessage) + case 73: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufEnumMap.self, value: &_storage._mapStringNestedEnum) + case 74: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufEnumMap.self, value: &_storage._mapStringForeignEnum) + case 111: + if _storage._oneofField != nil {try decoder.handleConflictingOneOf()} + var v: UInt32? + try decoder.decodeSingularUInt32Field(value: &v) + if let v = v {_storage._oneofField = .oneofUint32(v)} + case 112: + var v: ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedMessage? + if let current = _storage._oneofField { + try decoder.handleConflictingOneOf() + if case .oneofNestedMessage(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneofField = .oneofNestedMessage(v)} + case 113: + if _storage._oneofField != nil {try decoder.handleConflictingOneOf()} + var v: String? + try decoder.decodeSingularStringField(value: &v) + if let v = v {_storage._oneofField = .oneofString(v)} + case 114: + if _storage._oneofField != nil {try decoder.handleConflictingOneOf()} + var v: Data? + try decoder.decodeSingularBytesField(value: &v) + if let v = v {_storage._oneofField = .oneofBytes(v)} + case 115: + if _storage._oneofField != nil {try decoder.handleConflictingOneOf()} + var v: Bool? + try decoder.decodeSingularBoolField(value: &v) + if let v = v {_storage._oneofField = .oneofBool(v)} + case 116: + if _storage._oneofField != nil {try decoder.handleConflictingOneOf()} + var v: UInt64? + try decoder.decodeSingularUInt64Field(value: &v) + if let v = v {_storage._oneofField = .oneofUint64(v)} + case 117: + if _storage._oneofField != nil {try decoder.handleConflictingOneOf()} + var v: Float? + try decoder.decodeSingularFloatField(value: &v) + if let v = v {_storage._oneofField = .oneofFloat(v)} + case 118: + if _storage._oneofField != nil {try decoder.handleConflictingOneOf()} + var v: Double? + try decoder.decodeSingularDoubleField(value: &v) + if let v = v {_storage._oneofField = .oneofDouble(v)} + case 119: + if _storage._oneofField != nil {try decoder.handleConflictingOneOf()} + var v: ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedEnum? + try decoder.decodeSingularEnumField(value: &v) + if let v = v {_storage._oneofField = .oneofEnum(v)} + case 201: try decoder.decodeSingularGroupField(value: &_storage._data) + case 401: try decoder.decodeSingularInt32Field(value: &_storage._fieldname1) + case 402: try decoder.decodeSingularInt32Field(value: &_storage._fieldName2) + case 403: try decoder.decodeSingularInt32Field(value: &_storage._fieldName3) + case 404: try decoder.decodeSingularInt32Field(value: &_storage._field_Name4_) + case 405: try decoder.decodeSingularInt32Field(value: &_storage._field0Name5) + case 406: try decoder.decodeSingularInt32Field(value: &_storage._field0Name6) + case 407: try decoder.decodeSingularInt32Field(value: &_storage._fieldName7) + case 408: try decoder.decodeSingularInt32Field(value: &_storage._fieldName8) + case 409: try decoder.decodeSingularInt32Field(value: &_storage._fieldName9) + case 410: try decoder.decodeSingularInt32Field(value: &_storage._fieldName10) + case 411: try decoder.decodeSingularInt32Field(value: &_storage._fieldName11) + case 412: try decoder.decodeSingularInt32Field(value: &_storage._fieldName12) + case 413: try decoder.decodeSingularInt32Field(value: &_storage.__FieldName13) + case 414: try decoder.decodeSingularInt32Field(value: &_storage.__FieldName14) + case 415: try decoder.decodeSingularInt32Field(value: &_storage._field_Name15) + case 416: try decoder.decodeSingularInt32Field(value: &_storage._field_Name16) + case 417: try decoder.decodeSingularInt32Field(value: &_storage._fieldName17__) + case 418: try decoder.decodeSingularInt32Field(value: &_storage._fieldName18__) + case 120..<201: + try decoder.decodeExtensionField(values: &_protobuf_extensionFieldValues, messageType: ProtobufTestMessages_Proto2_TestAllTypesProto2.self, fieldNumber: fieldNumber) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if let v = _storage._optionalInt32 { + try visitor.visitSingularInt32Field(value: v, fieldNumber: 1) + } + if let v = _storage._optionalInt64 { + try visitor.visitSingularInt64Field(value: v, fieldNumber: 2) + } + if let v = _storage._optionalUint32 { + try visitor.visitSingularUInt32Field(value: v, fieldNumber: 3) + } + if let v = _storage._optionalUint64 { + try visitor.visitSingularUInt64Field(value: v, fieldNumber: 4) + } + if let v = _storage._optionalSint32 { + try visitor.visitSingularSInt32Field(value: v, fieldNumber: 5) + } + if let v = _storage._optionalSint64 { + try visitor.visitSingularSInt64Field(value: v, fieldNumber: 6) + } + if let v = _storage._optionalFixed32 { + try visitor.visitSingularFixed32Field(value: v, fieldNumber: 7) + } + if let v = _storage._optionalFixed64 { + try visitor.visitSingularFixed64Field(value: v, fieldNumber: 8) + } + if let v = _storage._optionalSfixed32 { + try visitor.visitSingularSFixed32Field(value: v, fieldNumber: 9) + } + if let v = _storage._optionalSfixed64 { + try visitor.visitSingularSFixed64Field(value: v, fieldNumber: 10) + } + if let v = _storage._optionalFloat { + try visitor.visitSingularFloatField(value: v, fieldNumber: 11) + } + if let v = _storage._optionalDouble { + try visitor.visitSingularDoubleField(value: v, fieldNumber: 12) + } + if let v = _storage._optionalBool { + try visitor.visitSingularBoolField(value: v, fieldNumber: 13) + } + if let v = _storage._optionalString { + try visitor.visitSingularStringField(value: v, fieldNumber: 14) + } + if let v = _storage._optionalBytes { + try visitor.visitSingularBytesField(value: v, fieldNumber: 15) + } + if let v = _storage._optionalNestedMessage { + try visitor.visitSingularMessageField(value: v, fieldNumber: 18) + } + if let v = _storage._optionalForeignMessage { + try visitor.visitSingularMessageField(value: v, fieldNumber: 19) + } + if let v = _storage._optionalNestedEnum { + try visitor.visitSingularEnumField(value: v, fieldNumber: 21) + } + if let v = _storage._optionalForeignEnum { + try visitor.visitSingularEnumField(value: v, fieldNumber: 22) + } + if let v = _storage._optionalStringPiece { + try visitor.visitSingularStringField(value: v, fieldNumber: 24) + } + if let v = _storage._optionalCord { + try visitor.visitSingularStringField(value: v, fieldNumber: 25) + } + if let v = _storage._recursiveMessage { + try visitor.visitSingularMessageField(value: v, fieldNumber: 27) + } + if !_storage._repeatedInt32.isEmpty { + try visitor.visitRepeatedInt32Field(value: _storage._repeatedInt32, fieldNumber: 31) + } + if !_storage._repeatedInt64.isEmpty { + try visitor.visitRepeatedInt64Field(value: _storage._repeatedInt64, fieldNumber: 32) + } + if !_storage._repeatedUint32.isEmpty { + try visitor.visitRepeatedUInt32Field(value: _storage._repeatedUint32, fieldNumber: 33) + } + if !_storage._repeatedUint64.isEmpty { + try visitor.visitRepeatedUInt64Field(value: _storage._repeatedUint64, fieldNumber: 34) + } + if !_storage._repeatedSint32.isEmpty { + try visitor.visitRepeatedSInt32Field(value: _storage._repeatedSint32, fieldNumber: 35) + } + if !_storage._repeatedSint64.isEmpty { + try visitor.visitRepeatedSInt64Field(value: _storage._repeatedSint64, fieldNumber: 36) + } + if !_storage._repeatedFixed32.isEmpty { + try visitor.visitRepeatedFixed32Field(value: _storage._repeatedFixed32, fieldNumber: 37) + } + if !_storage._repeatedFixed64.isEmpty { + try visitor.visitRepeatedFixed64Field(value: _storage._repeatedFixed64, fieldNumber: 38) + } + if !_storage._repeatedSfixed32.isEmpty { + try visitor.visitRepeatedSFixed32Field(value: _storage._repeatedSfixed32, fieldNumber: 39) + } + if !_storage._repeatedSfixed64.isEmpty { + try visitor.visitRepeatedSFixed64Field(value: _storage._repeatedSfixed64, fieldNumber: 40) + } + if !_storage._repeatedFloat.isEmpty { + try visitor.visitRepeatedFloatField(value: _storage._repeatedFloat, fieldNumber: 41) + } + if !_storage._repeatedDouble.isEmpty { + try visitor.visitRepeatedDoubleField(value: _storage._repeatedDouble, fieldNumber: 42) + } + if !_storage._repeatedBool.isEmpty { + try visitor.visitRepeatedBoolField(value: _storage._repeatedBool, fieldNumber: 43) + } + if !_storage._repeatedString.isEmpty { + try visitor.visitRepeatedStringField(value: _storage._repeatedString, fieldNumber: 44) + } + if !_storage._repeatedBytes.isEmpty { + try visitor.visitRepeatedBytesField(value: _storage._repeatedBytes, fieldNumber: 45) + } + if !_storage._repeatedNestedMessage.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._repeatedNestedMessage, fieldNumber: 48) + } + if !_storage._repeatedForeignMessage.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._repeatedForeignMessage, fieldNumber: 49) + } + if !_storage._repeatedNestedEnum.isEmpty { + try visitor.visitRepeatedEnumField(value: _storage._repeatedNestedEnum, fieldNumber: 51) + } + if !_storage._repeatedForeignEnum.isEmpty { + try visitor.visitRepeatedEnumField(value: _storage._repeatedForeignEnum, fieldNumber: 52) + } + if !_storage._repeatedStringPiece.isEmpty { + try visitor.visitRepeatedStringField(value: _storage._repeatedStringPiece, fieldNumber: 54) + } + if !_storage._repeatedCord.isEmpty { + try visitor.visitRepeatedStringField(value: _storage._repeatedCord, fieldNumber: 55) + } + if !_storage._mapInt32Int32.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: _storage._mapInt32Int32, fieldNumber: 56) + } + if !_storage._mapInt64Int64.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: _storage._mapInt64Int64, fieldNumber: 57) + } + if !_storage._mapUint32Uint32.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: _storage._mapUint32Uint32, fieldNumber: 58) + } + if !_storage._mapUint64Uint64.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: _storage._mapUint64Uint64, fieldNumber: 59) + } + if !_storage._mapSint32Sint32.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: _storage._mapSint32Sint32, fieldNumber: 60) + } + if !_storage._mapSint64Sint64.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: _storage._mapSint64Sint64, fieldNumber: 61) + } + if !_storage._mapFixed32Fixed32.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: _storage._mapFixed32Fixed32, fieldNumber: 62) + } + if !_storage._mapFixed64Fixed64.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: _storage._mapFixed64Fixed64, fieldNumber: 63) + } + if !_storage._mapSfixed32Sfixed32.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: _storage._mapSfixed32Sfixed32, fieldNumber: 64) + } + if !_storage._mapSfixed64Sfixed64.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: _storage._mapSfixed64Sfixed64, fieldNumber: 65) + } + if !_storage._mapInt32Float.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: _storage._mapInt32Float, fieldNumber: 66) + } + if !_storage._mapInt32Double.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: _storage._mapInt32Double, fieldNumber: 67) + } + if !_storage._mapBoolBool.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: _storage._mapBoolBool, fieldNumber: 68) + } + if !_storage._mapStringString.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: _storage._mapStringString, fieldNumber: 69) + } + if !_storage._mapStringBytes.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: _storage._mapStringBytes, fieldNumber: 70) + } + if !_storage._mapStringNestedMessage.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: _storage._mapStringNestedMessage, fieldNumber: 71) + } + if !_storage._mapStringForeignMessage.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: _storage._mapStringForeignMessage, fieldNumber: 72) + } + if !_storage._mapStringNestedEnum.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufEnumMap.self, value: _storage._mapStringNestedEnum, fieldNumber: 73) + } + if !_storage._mapStringForeignEnum.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufEnumMap.self, value: _storage._mapStringForeignEnum, fieldNumber: 74) + } + switch _storage._oneofField { + case .oneofUint32(let v)?: + try visitor.visitSingularUInt32Field(value: v, fieldNumber: 111) + case .oneofNestedMessage(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 112) + case .oneofString(let v)?: + try visitor.visitSingularStringField(value: v, fieldNumber: 113) + case .oneofBytes(let v)?: + try visitor.visitSingularBytesField(value: v, fieldNumber: 114) + case .oneofBool(let v)?: + try visitor.visitSingularBoolField(value: v, fieldNumber: 115) + case .oneofUint64(let v)?: + try visitor.visitSingularUInt64Field(value: v, fieldNumber: 116) + case .oneofFloat(let v)?: + try visitor.visitSingularFloatField(value: v, fieldNumber: 117) + case .oneofDouble(let v)?: + try visitor.visitSingularDoubleField(value: v, fieldNumber: 118) + case .oneofEnum(let v)?: + try visitor.visitSingularEnumField(value: v, fieldNumber: 119) + case nil: break + } + try visitor.visitExtensionFields(fields: _protobuf_extensionFieldValues, start: 120, end: 201) + if let v = _storage._data { + try visitor.visitSingularGroupField(value: v, fieldNumber: 201) + } + if let v = _storage._fieldname1 { + try visitor.visitSingularInt32Field(value: v, fieldNumber: 401) + } + if let v = _storage._fieldName2 { + try visitor.visitSingularInt32Field(value: v, fieldNumber: 402) + } + if let v = _storage._fieldName3 { + try visitor.visitSingularInt32Field(value: v, fieldNumber: 403) + } + if let v = _storage._field_Name4_ { + try visitor.visitSingularInt32Field(value: v, fieldNumber: 404) + } + if let v = _storage._field0Name5 { + try visitor.visitSingularInt32Field(value: v, fieldNumber: 405) + } + if let v = _storage._field0Name6 { + try visitor.visitSingularInt32Field(value: v, fieldNumber: 406) + } + if let v = _storage._fieldName7 { + try visitor.visitSingularInt32Field(value: v, fieldNumber: 407) + } + if let v = _storage._fieldName8 { + try visitor.visitSingularInt32Field(value: v, fieldNumber: 408) + } + if let v = _storage._fieldName9 { + try visitor.visitSingularInt32Field(value: v, fieldNumber: 409) + } + if let v = _storage._fieldName10 { + try visitor.visitSingularInt32Field(value: v, fieldNumber: 410) + } + if let v = _storage._fieldName11 { + try visitor.visitSingularInt32Field(value: v, fieldNumber: 411) + } + if let v = _storage._fieldName12 { + try visitor.visitSingularInt32Field(value: v, fieldNumber: 412) + } + if let v = _storage.__FieldName13 { + try visitor.visitSingularInt32Field(value: v, fieldNumber: 413) + } + if let v = _storage.__FieldName14 { + try visitor.visitSingularInt32Field(value: v, fieldNumber: 414) + } + if let v = _storage._field_Name15 { + try visitor.visitSingularInt32Field(value: v, fieldNumber: 415) + } + if let v = _storage._field_Name16 { + try visitor.visitSingularInt32Field(value: v, fieldNumber: 416) + } + if let v = _storage._fieldName17__ { + try visitor.visitSingularInt32Field(value: v, fieldNumber: 417) + } + if let v = _storage._fieldName18__ { + try visitor.visitSingularInt32Field(value: v, fieldNumber: 418) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + var _protobuf_extensionFieldValues = SwiftProtobuf.ExtensionFieldValueSet() + fileprivate var _storage = _StorageClass.defaultInstance +} + +struct ProtobufTestMessages_Proto2_ForeignMessage: SwiftProtobuf.Message { + static let protoMessageName: String = _protobuf_package + ".ForeignMessage" + + var c: Int32 { + get {return _c ?? 0} + set {_c = newValue} + } + /// Returns true if `c` has been explicitly set. + var hasC: Bool {return self._c != nil} + /// Clears the value of `c`. Subsequent reads from it will return its default value. + mutating func clearC() {self._c = nil} + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularInt32Field(value: &self._c) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + func traverse(visitor: inout V) throws { + if let v = self._c { + try visitor.visitSingularInt32Field(value: v, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _c: Int32? = nil +} + +// MARK: - Extension support defined in test_messages_proto2.proto. + +extension ProtobufTestMessages_Proto2_TestAllTypesProto2 { + + var ProtobufTestMessages_Proto2_extensionInt32: Int32 { + get {return getExtensionValue(ext: ProtobufTestMessages_Proto2_Extensions_extension_int32) ?? 0} + set {setExtensionValue(ext: ProtobufTestMessages_Proto2_Extensions_extension_int32, value: newValue)} + } + /// Returns true if extension `ProtobufTestMessages_Proto2_Extensions_extension_int32` + /// has been explicitly set. + var hasProtobufTestMessages_Proto2_extensionInt32: Bool { + return hasExtensionValue(ext: ProtobufTestMessages_Proto2_Extensions_extension_int32) + } + /// Clears the value of extension `ProtobufTestMessages_Proto2_Extensions_extension_int32`. + /// Subsequent reads from it will return its default value. + mutating func clearProtobufTestMessages_Proto2_extensionInt32() { + clearExtensionValue(ext: ProtobufTestMessages_Proto2_Extensions_extension_int32) + } +} + +extension ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrect { + + var ProtobufTestMessages_Proto2_TestAllTypesProto2_MessageSetCorrectExtension1_messageSetExtension: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension1 { + get {return getExtensionValue(ext: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension1.Extensions.message_set_extension) ?? ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension1()} + set {setExtensionValue(ext: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension1.Extensions.message_set_extension, value: newValue)} + } + /// Returns true if extension `ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension1.Extensions.message_set_extension` + /// has been explicitly set. + var hasProtobufTestMessages_Proto2_TestAllTypesProto2_MessageSetCorrectExtension1_messageSetExtension: Bool { + return hasExtensionValue(ext: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension1.Extensions.message_set_extension) + } + /// Clears the value of extension `ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension1.Extensions.message_set_extension`. + /// Subsequent reads from it will return its default value. + mutating func clearProtobufTestMessages_Proto2_TestAllTypesProto2_MessageSetCorrectExtension1_messageSetExtension() { + clearExtensionValue(ext: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension1.Extensions.message_set_extension) + } + + var ProtobufTestMessages_Proto2_TestAllTypesProto2_MessageSetCorrectExtension2_messageSetExtension: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension2 { + get {return getExtensionValue(ext: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension2.Extensions.message_set_extension) ?? ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension2()} + set {setExtensionValue(ext: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension2.Extensions.message_set_extension, value: newValue)} + } + /// Returns true if extension `ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension2.Extensions.message_set_extension` + /// has been explicitly set. + var hasProtobufTestMessages_Proto2_TestAllTypesProto2_MessageSetCorrectExtension2_messageSetExtension: Bool { + return hasExtensionValue(ext: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension2.Extensions.message_set_extension) + } + /// Clears the value of extension `ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension2.Extensions.message_set_extension`. + /// Subsequent reads from it will return its default value. + mutating func clearProtobufTestMessages_Proto2_TestAllTypesProto2_MessageSetCorrectExtension2_messageSetExtension() { + clearExtensionValue(ext: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension2.Extensions.message_set_extension) + } + +} + +/// A `SwiftProtobuf.SimpleExtensionMap` that includes all of the extensions defined by +/// this .proto file. It can be used any place an `SwiftProtobuf.ExtensionMap` is needed +/// in parsing, or it can be combined with other `SwiftProtobuf.SimpleExtensionMap`s to create +/// a larger `SwiftProtobuf.SimpleExtensionMap`. +let ProtobufTestMessages_Proto2_TestMessagesProto2_Extensions: SwiftProtobuf.SimpleExtensionMap = [ + ProtobufTestMessages_Proto2_Extensions_extension_int32, + ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension1.Extensions.message_set_extension, + ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension2.Extensions.message_set_extension +] + +let ProtobufTestMessages_Proto2_Extensions_extension_int32 = SwiftProtobuf.MessageExtension, ProtobufTestMessages_Proto2_TestAllTypesProto2>( + _protobuf_fieldNumber: 120, + fieldName: "protobuf_test_messages.proto2.extension_int32" +) + +extension ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension1 { + enum Extensions { + static let message_set_extension = SwiftProtobuf.MessageExtension, ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrect>( + _protobuf_fieldNumber: 1547769, + fieldName: "protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrectExtension1" + ) + } +} + +extension ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension2 { + enum Extensions { + static let message_set_extension = SwiftProtobuf.MessageExtension, ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrect>( + _protobuf_fieldNumber: 4135312, + fieldName: "protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrectExtension2" + ) + } +} + +// MARK: - Code below here is support for the SwiftProtobuf runtime. + +fileprivate let _protobuf_package = "protobuf_test_messages.proto2" + +extension ProtobufTestMessages_Proto2_ForeignEnum: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "FOREIGN_FOO"), + 1: .same(proto: "FOREIGN_BAR"), + 2: .same(proto: "FOREIGN_BAZ"), + ] +} + +extension ProtobufTestMessages_Proto2_TestAllTypesProto2: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "optional_int32"), + 2: .standard(proto: "optional_int64"), + 3: .standard(proto: "optional_uint32"), + 4: .standard(proto: "optional_uint64"), + 5: .standard(proto: "optional_sint32"), + 6: .standard(proto: "optional_sint64"), + 7: .standard(proto: "optional_fixed32"), + 8: .standard(proto: "optional_fixed64"), + 9: .standard(proto: "optional_sfixed32"), + 10: .standard(proto: "optional_sfixed64"), + 11: .standard(proto: "optional_float"), + 12: .standard(proto: "optional_double"), + 13: .standard(proto: "optional_bool"), + 14: .standard(proto: "optional_string"), + 15: .standard(proto: "optional_bytes"), + 18: .standard(proto: "optional_nested_message"), + 19: .standard(proto: "optional_foreign_message"), + 21: .standard(proto: "optional_nested_enum"), + 22: .standard(proto: "optional_foreign_enum"), + 24: .standard(proto: "optional_string_piece"), + 25: .standard(proto: "optional_cord"), + 27: .standard(proto: "recursive_message"), + 31: .standard(proto: "repeated_int32"), + 32: .standard(proto: "repeated_int64"), + 33: .standard(proto: "repeated_uint32"), + 34: .standard(proto: "repeated_uint64"), + 35: .standard(proto: "repeated_sint32"), + 36: .standard(proto: "repeated_sint64"), + 37: .standard(proto: "repeated_fixed32"), + 38: .standard(proto: "repeated_fixed64"), + 39: .standard(proto: "repeated_sfixed32"), + 40: .standard(proto: "repeated_sfixed64"), + 41: .standard(proto: "repeated_float"), + 42: .standard(proto: "repeated_double"), + 43: .standard(proto: "repeated_bool"), + 44: .standard(proto: "repeated_string"), + 45: .standard(proto: "repeated_bytes"), + 48: .standard(proto: "repeated_nested_message"), + 49: .standard(proto: "repeated_foreign_message"), + 51: .standard(proto: "repeated_nested_enum"), + 52: .standard(proto: "repeated_foreign_enum"), + 54: .standard(proto: "repeated_string_piece"), + 55: .standard(proto: "repeated_cord"), + 56: .standard(proto: "map_int32_int32"), + 57: .standard(proto: "map_int64_int64"), + 58: .standard(proto: "map_uint32_uint32"), + 59: .standard(proto: "map_uint64_uint64"), + 60: .standard(proto: "map_sint32_sint32"), + 61: .standard(proto: "map_sint64_sint64"), + 62: .standard(proto: "map_fixed32_fixed32"), + 63: .standard(proto: "map_fixed64_fixed64"), + 64: .standard(proto: "map_sfixed32_sfixed32"), + 65: .standard(proto: "map_sfixed64_sfixed64"), + 66: .standard(proto: "map_int32_float"), + 67: .standard(proto: "map_int32_double"), + 68: .standard(proto: "map_bool_bool"), + 69: .standard(proto: "map_string_string"), + 70: .standard(proto: "map_string_bytes"), + 71: .standard(proto: "map_string_nested_message"), + 72: .standard(proto: "map_string_foreign_message"), + 73: .standard(proto: "map_string_nested_enum"), + 74: .standard(proto: "map_string_foreign_enum"), + 111: .standard(proto: "oneof_uint32"), + 112: .standard(proto: "oneof_nested_message"), + 113: .standard(proto: "oneof_string"), + 114: .standard(proto: "oneof_bytes"), + 115: .standard(proto: "oneof_bool"), + 116: .standard(proto: "oneof_uint64"), + 117: .standard(proto: "oneof_float"), + 118: .standard(proto: "oneof_double"), + 119: .standard(proto: "oneof_enum"), + 201: .unique(proto: "Data", json: "data"), + 401: .same(proto: "fieldname1"), + 402: .standard(proto: "field_name2"), + 403: .standard(proto: "_field_name3"), + 404: .standard(proto: "field__name4_"), + 405: .same(proto: "field0name5"), + 406: .standard(proto: "field_0_name6"), + 407: .same(proto: "fieldName7"), + 408: .same(proto: "FieldName8"), + 409: .standard(proto: "field_Name9"), + 410: .standard(proto: "Field_Name10"), + 411: .standard(proto: "FIELD_NAME11"), + 412: .standard(proto: "FIELD_name12"), + 413: .standard(proto: "__field_name13"), + 414: .standard(proto: "__Field_name14"), + 415: .standard(proto: "field__name15"), + 416: .standard(proto: "field__Name16"), + 417: .standard(proto: "field_name17__"), + 418: .standard(proto: "Field_name18__"), + ] + + fileprivate class _StorageClass { + var _optionalInt32: Int32? = nil + var _optionalInt64: Int64? = nil + var _optionalUint32: UInt32? = nil + var _optionalUint64: UInt64? = nil + var _optionalSint32: Int32? = nil + var _optionalSint64: Int64? = nil + var _optionalFixed32: UInt32? = nil + var _optionalFixed64: UInt64? = nil + var _optionalSfixed32: Int32? = nil + var _optionalSfixed64: Int64? = nil + var _optionalFloat: Float? = nil + var _optionalDouble: Double? = nil + var _optionalBool: Bool? = nil + var _optionalString: String? = nil + var _optionalBytes: Data? = nil + var _optionalNestedMessage: ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedMessage? = nil + var _optionalForeignMessage: ProtobufTestMessages_Proto2_ForeignMessage? = nil + var _optionalNestedEnum: ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedEnum? = nil + var _optionalForeignEnum: ProtobufTestMessages_Proto2_ForeignEnum? = nil + var _optionalStringPiece: String? = nil + var _optionalCord: String? = nil + var _recursiveMessage: ProtobufTestMessages_Proto2_TestAllTypesProto2? = nil + var _repeatedInt32: [Int32] = [] + var _repeatedInt64: [Int64] = [] + var _repeatedUint32: [UInt32] = [] + var _repeatedUint64: [UInt64] = [] + var _repeatedSint32: [Int32] = [] + var _repeatedSint64: [Int64] = [] + var _repeatedFixed32: [UInt32] = [] + var _repeatedFixed64: [UInt64] = [] + var _repeatedSfixed32: [Int32] = [] + var _repeatedSfixed64: [Int64] = [] + var _repeatedFloat: [Float] = [] + var _repeatedDouble: [Double] = [] + var _repeatedBool: [Bool] = [] + var _repeatedString: [String] = [] + var _repeatedBytes: [Data] = [] + var _repeatedNestedMessage: [ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedMessage] = [] + var _repeatedForeignMessage: [ProtobufTestMessages_Proto2_ForeignMessage] = [] + var _repeatedNestedEnum: [ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedEnum] = [] + var _repeatedForeignEnum: [ProtobufTestMessages_Proto2_ForeignEnum] = [] + var _repeatedStringPiece: [String] = [] + var _repeatedCord: [String] = [] + var _mapInt32Int32: Dictionary = [:] + var _mapInt64Int64: Dictionary = [:] + var _mapUint32Uint32: Dictionary = [:] + var _mapUint64Uint64: Dictionary = [:] + var _mapSint32Sint32: Dictionary = [:] + var _mapSint64Sint64: Dictionary = [:] + var _mapFixed32Fixed32: Dictionary = [:] + var _mapFixed64Fixed64: Dictionary = [:] + var _mapSfixed32Sfixed32: Dictionary = [:] + var _mapSfixed64Sfixed64: Dictionary = [:] + var _mapInt32Float: Dictionary = [:] + var _mapInt32Double: Dictionary = [:] + var _mapBoolBool: Dictionary = [:] + var _mapStringString: Dictionary = [:] + var _mapStringBytes: Dictionary = [:] + var _mapStringNestedMessage: Dictionary = [:] + var _mapStringForeignMessage: Dictionary = [:] + var _mapStringNestedEnum: Dictionary = [:] + var _mapStringForeignEnum: Dictionary = [:] + var _oneofField: ProtobufTestMessages_Proto2_TestAllTypesProto2.OneOf_OneofField? + var _data: ProtobufTestMessages_Proto2_TestAllTypesProto2.DataMessage? = nil + var _fieldname1: Int32? = nil + var _fieldName2: Int32? = nil + var _fieldName3: Int32? = nil + var _field_Name4_: Int32? = nil + var _field0Name5: Int32? = nil + var _field0Name6: Int32? = nil + var _fieldName7: Int32? = nil + var _fieldName8: Int32? = nil + var _fieldName9: Int32? = nil + var _fieldName10: Int32? = nil + var _fieldName11: Int32? = nil + var _fieldName12: Int32? = nil + var __FieldName13: Int32? = nil + var __FieldName14: Int32? = nil + var _field_Name15: Int32? = nil + var _field_Name16: Int32? = nil + var _fieldName17__: Int32? = nil + var _fieldName18__: Int32? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _optionalInt32 = source._optionalInt32 + _optionalInt64 = source._optionalInt64 + _optionalUint32 = source._optionalUint32 + _optionalUint64 = source._optionalUint64 + _optionalSint32 = source._optionalSint32 + _optionalSint64 = source._optionalSint64 + _optionalFixed32 = source._optionalFixed32 + _optionalFixed64 = source._optionalFixed64 + _optionalSfixed32 = source._optionalSfixed32 + _optionalSfixed64 = source._optionalSfixed64 + _optionalFloat = source._optionalFloat + _optionalDouble = source._optionalDouble + _optionalBool = source._optionalBool + _optionalString = source._optionalString + _optionalBytes = source._optionalBytes + _optionalNestedMessage = source._optionalNestedMessage + _optionalForeignMessage = source._optionalForeignMessage + _optionalNestedEnum = source._optionalNestedEnum + _optionalForeignEnum = source._optionalForeignEnum + _optionalStringPiece = source._optionalStringPiece + _optionalCord = source._optionalCord + _recursiveMessage = source._recursiveMessage + _repeatedInt32 = source._repeatedInt32 + _repeatedInt64 = source._repeatedInt64 + _repeatedUint32 = source._repeatedUint32 + _repeatedUint64 = source._repeatedUint64 + _repeatedSint32 = source._repeatedSint32 + _repeatedSint64 = source._repeatedSint64 + _repeatedFixed32 = source._repeatedFixed32 + _repeatedFixed64 = source._repeatedFixed64 + _repeatedSfixed32 = source._repeatedSfixed32 + _repeatedSfixed64 = source._repeatedSfixed64 + _repeatedFloat = source._repeatedFloat + _repeatedDouble = source._repeatedDouble + _repeatedBool = source._repeatedBool + _repeatedString = source._repeatedString + _repeatedBytes = source._repeatedBytes + _repeatedNestedMessage = source._repeatedNestedMessage + _repeatedForeignMessage = source._repeatedForeignMessage + _repeatedNestedEnum = source._repeatedNestedEnum + _repeatedForeignEnum = source._repeatedForeignEnum + _repeatedStringPiece = source._repeatedStringPiece + _repeatedCord = source._repeatedCord + _mapInt32Int32 = source._mapInt32Int32 + _mapInt64Int64 = source._mapInt64Int64 + _mapUint32Uint32 = source._mapUint32Uint32 + _mapUint64Uint64 = source._mapUint64Uint64 + _mapSint32Sint32 = source._mapSint32Sint32 + _mapSint64Sint64 = source._mapSint64Sint64 + _mapFixed32Fixed32 = source._mapFixed32Fixed32 + _mapFixed64Fixed64 = source._mapFixed64Fixed64 + _mapSfixed32Sfixed32 = source._mapSfixed32Sfixed32 + _mapSfixed64Sfixed64 = source._mapSfixed64Sfixed64 + _mapInt32Float = source._mapInt32Float + _mapInt32Double = source._mapInt32Double + _mapBoolBool = source._mapBoolBool + _mapStringString = source._mapStringString + _mapStringBytes = source._mapStringBytes + _mapStringNestedMessage = source._mapStringNestedMessage + _mapStringForeignMessage = source._mapStringForeignMessage + _mapStringNestedEnum = source._mapStringNestedEnum + _mapStringForeignEnum = source._mapStringForeignEnum + _oneofField = source._oneofField + _data = source._data + _fieldname1 = source._fieldname1 + _fieldName2 = source._fieldName2 + _fieldName3 = source._fieldName3 + _field_Name4_ = source._field_Name4_ + _field0Name5 = source._field0Name5 + _field0Name6 = source._field0Name6 + _fieldName7 = source._fieldName7 + _fieldName8 = source._fieldName8 + _fieldName9 = source._fieldName9 + _fieldName10 = source._fieldName10 + _fieldName11 = source._fieldName11 + _fieldName12 = source._fieldName12 + __FieldName13 = source.__FieldName13 + __FieldName14 = source.__FieldName14 + _field_Name15 = source._field_Name15 + _field_Name16 = source._field_Name16 + _fieldName17__ = source._fieldName17__ + _fieldName18__ = source._fieldName18__ + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + func _protobuf_generated_isEqualTo(other: ProtobufTestMessages_Proto2_TestAllTypesProto2) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_args: (_StorageClass, _StorageClass)) in + let _storage = _args.0 + let other_storage = _args.1 + if _storage._optionalInt32 != other_storage._optionalInt32 {return false} + if _storage._optionalInt64 != other_storage._optionalInt64 {return false} + if _storage._optionalUint32 != other_storage._optionalUint32 {return false} + if _storage._optionalUint64 != other_storage._optionalUint64 {return false} + if _storage._optionalSint32 != other_storage._optionalSint32 {return false} + if _storage._optionalSint64 != other_storage._optionalSint64 {return false} + if _storage._optionalFixed32 != other_storage._optionalFixed32 {return false} + if _storage._optionalFixed64 != other_storage._optionalFixed64 {return false} + if _storage._optionalSfixed32 != other_storage._optionalSfixed32 {return false} + if _storage._optionalSfixed64 != other_storage._optionalSfixed64 {return false} + if _storage._optionalFloat != other_storage._optionalFloat {return false} + if _storage._optionalDouble != other_storage._optionalDouble {return false} + if _storage._optionalBool != other_storage._optionalBool {return false} + if _storage._optionalString != other_storage._optionalString {return false} + if _storage._optionalBytes != other_storage._optionalBytes {return false} + if _storage._optionalNestedMessage != other_storage._optionalNestedMessage {return false} + if _storage._optionalForeignMessage != other_storage._optionalForeignMessage {return false} + if _storage._optionalNestedEnum != other_storage._optionalNestedEnum {return false} + if _storage._optionalForeignEnum != other_storage._optionalForeignEnum {return false} + if _storage._optionalStringPiece != other_storage._optionalStringPiece {return false} + if _storage._optionalCord != other_storage._optionalCord {return false} + if _storage._recursiveMessage != other_storage._recursiveMessage {return false} + if _storage._repeatedInt32 != other_storage._repeatedInt32 {return false} + if _storage._repeatedInt64 != other_storage._repeatedInt64 {return false} + if _storage._repeatedUint32 != other_storage._repeatedUint32 {return false} + if _storage._repeatedUint64 != other_storage._repeatedUint64 {return false} + if _storage._repeatedSint32 != other_storage._repeatedSint32 {return false} + if _storage._repeatedSint64 != other_storage._repeatedSint64 {return false} + if _storage._repeatedFixed32 != other_storage._repeatedFixed32 {return false} + if _storage._repeatedFixed64 != other_storage._repeatedFixed64 {return false} + if _storage._repeatedSfixed32 != other_storage._repeatedSfixed32 {return false} + if _storage._repeatedSfixed64 != other_storage._repeatedSfixed64 {return false} + if _storage._repeatedFloat != other_storage._repeatedFloat {return false} + if _storage._repeatedDouble != other_storage._repeatedDouble {return false} + if _storage._repeatedBool != other_storage._repeatedBool {return false} + if _storage._repeatedString != other_storage._repeatedString {return false} + if _storage._repeatedBytes != other_storage._repeatedBytes {return false} + if _storage._repeatedNestedMessage != other_storage._repeatedNestedMessage {return false} + if _storage._repeatedForeignMessage != other_storage._repeatedForeignMessage {return false} + if _storage._repeatedNestedEnum != other_storage._repeatedNestedEnum {return false} + if _storage._repeatedForeignEnum != other_storage._repeatedForeignEnum {return false} + if _storage._repeatedStringPiece != other_storage._repeatedStringPiece {return false} + if _storage._repeatedCord != other_storage._repeatedCord {return false} + if _storage._mapInt32Int32 != other_storage._mapInt32Int32 {return false} + if _storage._mapInt64Int64 != other_storage._mapInt64Int64 {return false} + if _storage._mapUint32Uint32 != other_storage._mapUint32Uint32 {return false} + if _storage._mapUint64Uint64 != other_storage._mapUint64Uint64 {return false} + if _storage._mapSint32Sint32 != other_storage._mapSint32Sint32 {return false} + if _storage._mapSint64Sint64 != other_storage._mapSint64Sint64 {return false} + if _storage._mapFixed32Fixed32 != other_storage._mapFixed32Fixed32 {return false} + if _storage._mapFixed64Fixed64 != other_storage._mapFixed64Fixed64 {return false} + if _storage._mapSfixed32Sfixed32 != other_storage._mapSfixed32Sfixed32 {return false} + if _storage._mapSfixed64Sfixed64 != other_storage._mapSfixed64Sfixed64 {return false} + if _storage._mapInt32Float != other_storage._mapInt32Float {return false} + if _storage._mapInt32Double != other_storage._mapInt32Double {return false} + if _storage._mapBoolBool != other_storage._mapBoolBool {return false} + if _storage._mapStringString != other_storage._mapStringString {return false} + if _storage._mapStringBytes != other_storage._mapStringBytes {return false} + if _storage._mapStringNestedMessage != other_storage._mapStringNestedMessage {return false} + if _storage._mapStringForeignMessage != other_storage._mapStringForeignMessage {return false} + if _storage._mapStringNestedEnum != other_storage._mapStringNestedEnum {return false} + if _storage._mapStringForeignEnum != other_storage._mapStringForeignEnum {return false} + if _storage._oneofField != other_storage._oneofField {return false} + if _storage._data != other_storage._data {return false} + if _storage._fieldname1 != other_storage._fieldname1 {return false} + if _storage._fieldName2 != other_storage._fieldName2 {return false} + if _storage._fieldName3 != other_storage._fieldName3 {return false} + if _storage._field_Name4_ != other_storage._field_Name4_ {return false} + if _storage._field0Name5 != other_storage._field0Name5 {return false} + if _storage._field0Name6 != other_storage._field0Name6 {return false} + if _storage._fieldName7 != other_storage._fieldName7 {return false} + if _storage._fieldName8 != other_storage._fieldName8 {return false} + if _storage._fieldName9 != other_storage._fieldName9 {return false} + if _storage._fieldName10 != other_storage._fieldName10 {return false} + if _storage._fieldName11 != other_storage._fieldName11 {return false} + if _storage._fieldName12 != other_storage._fieldName12 {return false} + if _storage.__FieldName13 != other_storage.__FieldName13 {return false} + if _storage.__FieldName14 != other_storage.__FieldName14 {return false} + if _storage._field_Name15 != other_storage._field_Name15 {return false} + if _storage._field_Name16 != other_storage._field_Name16 {return false} + if _storage._fieldName17__ != other_storage._fieldName17__ {return false} + if _storage._fieldName18__ != other_storage._fieldName18__ {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + if _protobuf_extensionFieldValues != other._protobuf_extensionFieldValues {return false} + return true + } +} + +extension ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedEnum: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + -1: .same(proto: "NEG"), + 0: .same(proto: "FOO"), + 1: .same(proto: "BAR"), + 2: .same(proto: "BAZ"), + ] +} + +extension ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedMessage: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "a"), + 2: .same(proto: "corecursive"), + ] + + fileprivate class _StorageClass { + var _a: Int32? = nil + var _corecursive: ProtobufTestMessages_Proto2_TestAllTypesProto2? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _a = source._a + _corecursive = source._corecursive + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + func _protobuf_generated_isEqualTo(other: ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedMessage) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_args: (_StorageClass, _StorageClass)) in + let _storage = _args.0 + let other_storage = _args.1 + if _storage._a != other_storage._a {return false} + if _storage._corecursive != other_storage._corecursive {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension ProtobufTestMessages_Proto2_TestAllTypesProto2.DataMessage: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 202: .standard(proto: "group_int32"), + 203: .standard(proto: "group_uint32"), + ] + + func _protobuf_generated_isEqualTo(other: ProtobufTestMessages_Proto2_TestAllTypesProto2.DataMessage) -> Bool { + if self._groupInt32 != other._groupInt32 {return false} + if self._groupUint32 != other._groupUint32 {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrect: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap = SwiftProtobuf._NameMap() + + func _protobuf_generated_isEqualTo(other: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrect) -> Bool { + if unknownFields != other.unknownFields {return false} + if _protobuf_extensionFieldValues != other._protobuf_extensionFieldValues {return false} + return true + } +} + +extension ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension1: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 25: .same(proto: "str"), + ] + + func _protobuf_generated_isEqualTo(other: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension1) -> Bool { + if self._str != other._str {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension2: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 9: .same(proto: "i"), + ] + + func _protobuf_generated_isEqualTo(other: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension2) -> Bool { + if self._i != other._i {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension ProtobufTestMessages_Proto2_ForeignMessage: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "c"), + ] + + func _protobuf_generated_isEqualTo(other: ProtobufTestMessages_Proto2_ForeignMessage) -> Bool { + if self._c != other._c {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} diff --git a/Reference/google/protobuf/test_messages_proto3.pb.swift b/Reference/google/protobuf/test_messages_proto3.pb.swift index 7e72bd24e..71b6446cf 100644 --- a/Reference/google/protobuf/test_messages_proto3.pb.swift +++ b/Reference/google/protobuf/test_messages_proto3.pb.swift @@ -93,8 +93,8 @@ enum ProtobufTestMessages_Proto3_ForeignEnum: SwiftProtobuf.Enum { /// 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. -struct ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf.Message { - static let protoMessageName: String = _protobuf_package + ".TestAllTypes" +struct ProtobufTestMessages_Proto3_TestAllTypesProto3: SwiftProtobuf.Message { + static let protoMessageName: String = _protobuf_package + ".TestAllTypesProto3" /// Singular var optionalInt32: Int32 { @@ -172,8 +172,8 @@ struct ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf.Message { set {_uniqueStorage()._optionalBytes = newValue} } - var optionalNestedMessage: ProtobufTestMessages_Proto3_TestAllTypes.NestedMessage { - get {return _storage._optionalNestedMessage ?? ProtobufTestMessages_Proto3_TestAllTypes.NestedMessage()} + var optionalNestedMessage: ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedMessage { + get {return _storage._optionalNestedMessage ?? ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedMessage()} set {_uniqueStorage()._optionalNestedMessage = newValue} } /// Returns true if `optionalNestedMessage` has been explicitly set. @@ -190,7 +190,7 @@ struct ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf.Message { /// Clears the value of `optionalForeignMessage`. Subsequent reads from it will return its default value. mutating func clearOptionalForeignMessage() {_storage._optionalForeignMessage = nil} - var optionalNestedEnum: ProtobufTestMessages_Proto3_TestAllTypes.NestedEnum { + var optionalNestedEnum: ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedEnum { get {return _storage._optionalNestedEnum} set {_uniqueStorage()._optionalNestedEnum = newValue} } @@ -210,8 +210,8 @@ struct ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf.Message { set {_uniqueStorage()._optionalCord = newValue} } - var recursiveMessage: ProtobufTestMessages_Proto3_TestAllTypes { - get {return _storage._recursiveMessage ?? ProtobufTestMessages_Proto3_TestAllTypes()} + var recursiveMessage: ProtobufTestMessages_Proto3_TestAllTypesProto3 { + get {return _storage._recursiveMessage ?? ProtobufTestMessages_Proto3_TestAllTypesProto3()} set {_uniqueStorage()._recursiveMessage = newValue} } /// Returns true if `recursiveMessage` has been explicitly set. @@ -295,7 +295,7 @@ struct ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf.Message { set {_uniqueStorage()._repeatedBytes = newValue} } - var repeatedNestedMessage: [ProtobufTestMessages_Proto3_TestAllTypes.NestedMessage] { + var repeatedNestedMessage: [ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedMessage] { get {return _storage._repeatedNestedMessage} set {_uniqueStorage()._repeatedNestedMessage = newValue} } @@ -305,7 +305,7 @@ struct ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf.Message { set {_uniqueStorage()._repeatedForeignMessage = newValue} } - var repeatedNestedEnum: [ProtobufTestMessages_Proto3_TestAllTypes.NestedEnum] { + var repeatedNestedEnum: [ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedEnum] { get {return _storage._repeatedNestedEnum} set {_uniqueStorage()._repeatedNestedEnum = newValue} } @@ -401,7 +401,7 @@ struct ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf.Message { set {_uniqueStorage()._mapStringBytes = newValue} } - var mapStringNestedMessage: Dictionary { + var mapStringNestedMessage: Dictionary { get {return _storage._mapStringNestedMessage} set {_uniqueStorage()._mapStringNestedMessage = newValue} } @@ -411,7 +411,7 @@ struct ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf.Message { set {_uniqueStorage()._mapStringForeignMessage = newValue} } - var mapStringNestedEnum: Dictionary { + var mapStringNestedEnum: Dictionary { get {return _storage._mapStringNestedEnum} set {_uniqueStorage()._mapStringNestedEnum = newValue} } @@ -434,10 +434,10 @@ struct ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf.Message { set {_uniqueStorage()._oneofField = .oneofUint32(newValue)} } - var oneofNestedMessage: ProtobufTestMessages_Proto3_TestAllTypes.NestedMessage { + var oneofNestedMessage: ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedMessage { get { if case .oneofNestedMessage(let v)? = _storage._oneofField {return v} - return ProtobufTestMessages_Proto3_TestAllTypes.NestedMessage() + return ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedMessage() } set {_uniqueStorage()._oneofField = .oneofNestedMessage(newValue)} } @@ -490,7 +490,7 @@ struct ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf.Message { set {_uniqueStorage()._oneofField = .oneofDouble(newValue)} } - var oneofEnum: ProtobufTestMessages_Proto3_TestAllTypes.NestedEnum { + var oneofEnum: ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedEnum { get { if case .oneofEnum(let v)? = _storage._oneofField {return v} return .foo @@ -805,16 +805,16 @@ struct ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf.Message { enum OneOf_OneofField: Equatable { case oneofUint32(UInt32) - case oneofNestedMessage(ProtobufTestMessages_Proto3_TestAllTypes.NestedMessage) + case oneofNestedMessage(ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedMessage) case oneofString(String) case oneofBytes(Data) case oneofBool(Bool) case oneofUint64(UInt64) case oneofFloat(Float) case oneofDouble(Double) - case oneofEnum(ProtobufTestMessages_Proto3_TestAllTypes.NestedEnum) + case oneofEnum(ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedEnum) - static func ==(lhs: ProtobufTestMessages_Proto3_TestAllTypes.OneOf_OneofField, rhs: ProtobufTestMessages_Proto3_TestAllTypes.OneOf_OneofField) -> Bool { + static func ==(lhs: ProtobufTestMessages_Proto3_TestAllTypesProto3.OneOf_OneofField, rhs: ProtobufTestMessages_Proto3_TestAllTypesProto3.OneOf_OneofField) -> Bool { switch (lhs, rhs) { case (.oneofUint32(let l), .oneofUint32(let r)): return l == r case (.oneofNestedMessage(let l), .oneofNestedMessage(let r)): return l == r @@ -867,15 +867,15 @@ struct ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf.Message { } struct NestedMessage: SwiftProtobuf.Message { - static let protoMessageName: String = ProtobufTestMessages_Proto3_TestAllTypes.protoMessageName + ".NestedMessage" + static let protoMessageName: String = ProtobufTestMessages_Proto3_TestAllTypesProto3.protoMessageName + ".NestedMessage" var a: Int32 { get {return _storage._a} set {_uniqueStorage()._a = newValue} } - var corecursive: ProtobufTestMessages_Proto3_TestAllTypes { - get {return _storage._corecursive ?? ProtobufTestMessages_Proto3_TestAllTypes()} + var corecursive: ProtobufTestMessages_Proto3_TestAllTypesProto3 { + get {return _storage._corecursive ?? ProtobufTestMessages_Proto3_TestAllTypesProto3()} set {_uniqueStorage()._corecursive = newValue} } /// Returns true if `corecursive` has been explicitly set. @@ -992,9 +992,9 @@ struct ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf.Message { case 68: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: &_storage._mapBoolBool) case 69: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: &_storage._mapStringString) case 70: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: &_storage._mapStringBytes) - case 71: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: &_storage._mapStringNestedMessage) + case 71: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: &_storage._mapStringNestedMessage) case 72: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: &_storage._mapStringForeignMessage) - case 73: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufEnumMap.self, value: &_storage._mapStringNestedEnum) + case 73: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufEnumMap.self, value: &_storage._mapStringNestedEnum) case 74: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufEnumMap.self, value: &_storage._mapStringForeignEnum) case 111: if _storage._oneofField != nil {try decoder.handleConflictingOneOf()} @@ -1002,7 +1002,7 @@ struct ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf.Message { try decoder.decodeSingularUInt32Field(value: &v) if let v = v {_storage._oneofField = .oneofUint32(v)} case 112: - var v: ProtobufTestMessages_Proto3_TestAllTypes.NestedMessage? + var v: ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedMessage? if let current = _storage._oneofField { try decoder.handleConflictingOneOf() if case .oneofNestedMessage(let m) = current {v = m} @@ -1041,7 +1041,7 @@ struct ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf.Message { if let v = v {_storage._oneofField = .oneofDouble(v)} case 119: if _storage._oneofField != nil {try decoder.handleConflictingOneOf()} - var v: ProtobufTestMessages_Proto3_TestAllTypes.NestedEnum? + var v: ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedEnum? try decoder.decodeSingularEnumField(value: &v) if let v = v {_storage._oneofField = .oneofEnum(v)} case 201: try decoder.decodeSingularMessageField(value: &_storage._optionalBoolWrapper) @@ -1279,13 +1279,13 @@ struct ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf.Message { try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: _storage._mapStringBytes, fieldNumber: 70) } if !_storage._mapStringNestedMessage.isEmpty { - try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: _storage._mapStringNestedMessage, fieldNumber: 71) + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: _storage._mapStringNestedMessage, fieldNumber: 71) } if !_storage._mapStringForeignMessage.isEmpty { try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: _storage._mapStringForeignMessage, fieldNumber: 72) } if !_storage._mapStringNestedEnum.isEmpty { - try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufEnumMap.self, value: _storage._mapStringNestedEnum, fieldNumber: 73) + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufEnumMap.self, value: _storage._mapStringNestedEnum, fieldNumber: 73) } if !_storage._mapStringForeignEnum.isEmpty { try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufEnumMap.self, value: _storage._mapStringForeignEnum, fieldNumber: 74) @@ -1508,7 +1508,7 @@ extension ProtobufTestMessages_Proto3_ForeignEnum: SwiftProtobuf._ProtoNameProvi ] } -extension ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { +extension ProtobufTestMessages_Proto3_TestAllTypesProto3: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "optional_int32"), 2: .standard(proto: "optional_int64"), @@ -1647,13 +1647,13 @@ extension ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf._MessageImplem var _optionalBool: Bool = false var _optionalString: String = String() var _optionalBytes: Data = SwiftProtobuf.Internal.emptyData - var _optionalNestedMessage: ProtobufTestMessages_Proto3_TestAllTypes.NestedMessage? = nil + var _optionalNestedMessage: ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedMessage? = nil var _optionalForeignMessage: ProtobufTestMessages_Proto3_ForeignMessage? = nil - var _optionalNestedEnum: ProtobufTestMessages_Proto3_TestAllTypes.NestedEnum = .foo + var _optionalNestedEnum: ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedEnum = .foo var _optionalForeignEnum: ProtobufTestMessages_Proto3_ForeignEnum = .foreignFoo var _optionalStringPiece: String = String() var _optionalCord: String = String() - var _recursiveMessage: ProtobufTestMessages_Proto3_TestAllTypes? = nil + var _recursiveMessage: ProtobufTestMessages_Proto3_TestAllTypesProto3? = nil var _repeatedInt32: [Int32] = [] var _repeatedInt64: [Int64] = [] var _repeatedUint32: [UInt32] = [] @@ -1669,9 +1669,9 @@ extension ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf._MessageImplem var _repeatedBool: [Bool] = [] var _repeatedString: [String] = [] var _repeatedBytes: [Data] = [] - var _repeatedNestedMessage: [ProtobufTestMessages_Proto3_TestAllTypes.NestedMessage] = [] + var _repeatedNestedMessage: [ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedMessage] = [] var _repeatedForeignMessage: [ProtobufTestMessages_Proto3_ForeignMessage] = [] - var _repeatedNestedEnum: [ProtobufTestMessages_Proto3_TestAllTypes.NestedEnum] = [] + var _repeatedNestedEnum: [ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedEnum] = [] var _repeatedForeignEnum: [ProtobufTestMessages_Proto3_ForeignEnum] = [] var _repeatedStringPiece: [String] = [] var _repeatedCord: [String] = [] @@ -1690,11 +1690,11 @@ extension ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf._MessageImplem var _mapBoolBool: Dictionary = [:] var _mapStringString: Dictionary = [:] var _mapStringBytes: Dictionary = [:] - var _mapStringNestedMessage: Dictionary = [:] + var _mapStringNestedMessage: Dictionary = [:] var _mapStringForeignMessage: Dictionary = [:] - var _mapStringNestedEnum: Dictionary = [:] + var _mapStringNestedEnum: Dictionary = [:] var _mapStringForeignEnum: Dictionary = [:] - var _oneofField: ProtobufTestMessages_Proto3_TestAllTypes.OneOf_OneofField? + var _oneofField: ProtobufTestMessages_Proto3_TestAllTypesProto3.OneOf_OneofField? var _optionalBoolWrapper: SwiftProtobuf.Google_Protobuf_BoolValue? = nil var _optionalInt32Wrapper: SwiftProtobuf.Google_Protobuf_Int32Value? = nil var _optionalInt64Wrapper: SwiftProtobuf.Google_Protobuf_Int64Value? = nil @@ -1870,7 +1870,7 @@ extension ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf._MessageImplem return _storage } - func _protobuf_generated_isEqualTo(other: ProtobufTestMessages_Proto3_TestAllTypes) -> Bool { + func _protobuf_generated_isEqualTo(other: ProtobufTestMessages_Proto3_TestAllTypesProto3) -> Bool { if _storage !== other._storage { let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_args: (_StorageClass, _StorageClass)) in let _storage = _args.0 @@ -1995,7 +1995,7 @@ extension ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf._MessageImplem } } -extension ProtobufTestMessages_Proto3_TestAllTypes.NestedEnum: SwiftProtobuf._ProtoNameProviding { +extension ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedEnum: SwiftProtobuf._ProtoNameProviding { static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ -1: .same(proto: "NEG"), 0: .same(proto: "FOO"), @@ -2004,7 +2004,7 @@ extension ProtobufTestMessages_Proto3_TestAllTypes.NestedEnum: SwiftProtobuf._Pr ] } -extension ProtobufTestMessages_Proto3_TestAllTypes.NestedMessage: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { +extension ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedMessage: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "a"), 2: .same(proto: "corecursive"), @@ -2012,7 +2012,7 @@ extension ProtobufTestMessages_Proto3_TestAllTypes.NestedMessage: SwiftProtobuf. fileprivate class _StorageClass { var _a: Int32 = 0 - var _corecursive: ProtobufTestMessages_Proto3_TestAllTypes? = nil + var _corecursive: ProtobufTestMessages_Proto3_TestAllTypesProto3? = nil static let defaultInstance = _StorageClass() @@ -2031,7 +2031,7 @@ extension ProtobufTestMessages_Proto3_TestAllTypes.NestedMessage: SwiftProtobuf. return _storage } - func _protobuf_generated_isEqualTo(other: ProtobufTestMessages_Proto3_TestAllTypes.NestedMessage) -> Bool { + func _protobuf_generated_isEqualTo(other: ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedMessage) -> Bool { if _storage !== other._storage { let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_args: (_StorageClass, _StorageClass)) in let _storage = _args.0 diff --git a/Sources/Conformance/conformance.pb.swift b/Sources/Conformance/conformance.pb.swift index 8dadc271d..1e554ba16 100644 --- a/Sources/Conformance/conformance.pb.swift +++ b/Sources/Conformance/conformance.pb.swift @@ -116,6 +116,11 @@ struct Conformance_ConformanceRequest: SwiftProtobuf.Message { /// Which format should the testee serialize its message to? var requestedOutputFormat: Conformance_WireFormat = .unspecified + /// The full name for the test message to use; for the moment, either: + /// protobuf_test_messages.proto3.TestAllTypesProto3 or + /// protobuf_test_messages.proto2.TestAllTypesProto2. + var messageType: String = String() + var unknownFields = SwiftProtobuf.UnknownStorage() /// The payload (whether protobuf of JSON) is always for a @@ -158,6 +163,7 @@ struct Conformance_ConformanceRequest: SwiftProtobuf.Message { try decoder.decodeSingularStringField(value: &v) if let v = v {self.payload = .jsonPayload(v)} case 3: try decoder.decodeSingularEnumField(value: &self.requestedOutputFormat) + case 4: try decoder.decodeSingularStringField(value: &self.messageType) default: break } } @@ -178,6 +184,9 @@ struct Conformance_ConformanceRequest: SwiftProtobuf.Message { if self.requestedOutputFormat != .unspecified { try visitor.visitSingularEnumField(value: self.requestedOutputFormat, fieldNumber: 3) } + if !self.messageType.isEmpty { + try visitor.visitSingularStringField(value: self.messageType, fieldNumber: 4) + } try unknownFields.traverse(visitor: &visitor) } } @@ -378,11 +387,13 @@ extension Conformance_ConformanceRequest: SwiftProtobuf._MessageImplementationBa 1: .standard(proto: "protobuf_payload"), 2: .standard(proto: "json_payload"), 3: .standard(proto: "requested_output_format"), + 4: .standard(proto: "message_type"), ] func _protobuf_generated_isEqualTo(other: Conformance_ConformanceRequest) -> Bool { if self.payload != other.payload {return false} if self.requestedOutputFormat != other.requestedOutputFormat {return false} + if self.messageType != other.messageType {return false} if unknownFields != other.unknownFields {return false} return true } diff --git a/Sources/Conformance/main.swift b/Sources/Conformance/main.swift index 50998744b..127dadc46 100644 --- a/Sources/Conformance/main.swift +++ b/Sources/Conformance/main.swift @@ -60,32 +60,39 @@ func buildResponse(serializedData: Data) -> Conformance_ConformanceResponse { return response } - let parsed: ProtobufTestMessages_Proto3_TestAllTypes? + let msgType: SwiftProtobuf.Message.Type + switch request.messageType { + case "": + // Note: This case is here to cover using a old version of the conformance test + // runner that don't know about this field, and it is thus implicit. + fallthrough + case ProtobufTestMessages_Proto3_TestAllTypesProto3.protoMessageName: + msgType = ProtobufTestMessages_Proto3_TestAllTypesProto3.self + case ProtobufTestMessages_Proto2_TestAllTypesProto2.protoMessageName: + msgType = ProtobufTestMessages_Proto2_TestAllTypesProto2.self + default: + response.runtimeError = "Unexpected message type: \(request.messageType)" + return response + } + + let testMessage: SwiftProtobuf.Message switch request.payload { case .protobufPayload(let data)?: do { - parsed = try ProtobufTestMessages_Proto3_TestAllTypes(serializedData: data) + testMessage = try msgType.init(serializedData: data) } catch let e { response.parseError = "Protobuf failed to parse: \(e)" return response } case .jsonPayload(let json)?: do { - parsed = try ProtobufTestMessages_Proto3_TestAllTypes(jsonString: json) + testMessage = try msgType.init(jsonString: json) } catch let e { response.parseError = "JSON failed to parse: \(e)" return response } - default: - assert(false) - return response - } - - let testMessage: ProtobufTestMessages_Proto3_TestAllTypes - if let parsed = parsed { - testMessage = parsed - } else { - response.parseError = "Failed to parse" + case nil: + response.runtimeError = "No payload in request:\n\(request.textFormatString())" return response } @@ -102,8 +109,10 @@ func buildResponse(serializedData: Data) -> Conformance_ConformanceResponse { } catch let e { response.serializeError = "Failed to serialize: \(e)" } - default: - assert(false) + case .unspecified: + response.runtimeError = "Request asked for the 'unspecified' result, that isn't valid." + case .UNRECOGNIZED(let v): + response.runtimeError = "Unknown output format: \(v)" } return response } @@ -119,7 +128,7 @@ func singleTest() throws -> Bool { } } -Google_Protobuf_Any.register(messageType: ProtobufTestMessages_Proto3_TestAllTypes.self) +Google_Protobuf_Any.register(messageType: ProtobufTestMessages_Proto3_TestAllTypesProto3.self) while try singleTest() { } diff --git a/Sources/Conformance/test_messages_proto2.pb.swift b/Sources/Conformance/test_messages_proto2.pb.swift new file mode 100644 index 000000000..d4a246eb1 --- /dev/null +++ b/Sources/Conformance/test_messages_proto2.pb.swift @@ -0,0 +1,2117 @@ +// DO NOT EDIT. +// +// Generated by the Swift generator plugin for the protocol buffer compiler. +// Source: google/protobuf/test_messages_proto2.proto +// +// For information on using the generated types, please see the documenation: +// https://github.com/apple/swift-protobuf/ + +// 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 proto2 messages. This test schema is used by: +// +// - conformance tests + +import Foundation +import SwiftProtobuf + +// If the compiler emits an error on this type, it is because this file +// was generated by a version of the `protoc` Swift plug-in that is +// incompatible with the version of SwiftProtobuf to which you are linking. +// Please ensure that your are building against the same version of the API +// that was used to generate this file. +fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { + struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} + typealias Version = _2 +} + +enum ProtobufTestMessages_Proto2_ForeignEnum: SwiftProtobuf.Enum { + typealias RawValue = Int + case foreignFoo // = 0 + case foreignBar // = 1 + case foreignBaz // = 2 + + init() { + self = .foreignFoo + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .foreignFoo + case 1: self = .foreignBar + case 2: self = .foreignBaz + default: return nil + } + } + + var rawValue: Int { + switch self { + case .foreignFoo: return 0 + case .foreignBar: return 1 + case .foreignBaz: return 2 + } + } + +} + +/// 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. +struct ProtobufTestMessages_Proto2_TestAllTypesProto2: SwiftProtobuf.Message, SwiftProtobuf.ExtensibleMessage { + static let protoMessageName: String = _protobuf_package + ".TestAllTypesProto2" + + /// Singular + var optionalInt32: Int32 { + get {return _storage._optionalInt32 ?? 0} + set {_uniqueStorage()._optionalInt32 = newValue} + } + /// Returns true if `optionalInt32` has been explicitly set. + var hasOptionalInt32: Bool {return _storage._optionalInt32 != nil} + /// Clears the value of `optionalInt32`. Subsequent reads from it will return its default value. + mutating func clearOptionalInt32() {_storage._optionalInt32 = nil} + + var optionalInt64: Int64 { + get {return _storage._optionalInt64 ?? 0} + set {_uniqueStorage()._optionalInt64 = newValue} + } + /// Returns true if `optionalInt64` has been explicitly set. + var hasOptionalInt64: Bool {return _storage._optionalInt64 != nil} + /// Clears the value of `optionalInt64`. Subsequent reads from it will return its default value. + mutating func clearOptionalInt64() {_storage._optionalInt64 = nil} + + var optionalUint32: UInt32 { + get {return _storage._optionalUint32 ?? 0} + set {_uniqueStorage()._optionalUint32 = newValue} + } + /// Returns true if `optionalUint32` has been explicitly set. + var hasOptionalUint32: Bool {return _storage._optionalUint32 != nil} + /// Clears the value of `optionalUint32`. Subsequent reads from it will return its default value. + mutating func clearOptionalUint32() {_storage._optionalUint32 = nil} + + var optionalUint64: UInt64 { + get {return _storage._optionalUint64 ?? 0} + set {_uniqueStorage()._optionalUint64 = newValue} + } + /// Returns true if `optionalUint64` has been explicitly set. + var hasOptionalUint64: Bool {return _storage._optionalUint64 != nil} + /// Clears the value of `optionalUint64`. Subsequent reads from it will return its default value. + mutating func clearOptionalUint64() {_storage._optionalUint64 = nil} + + var optionalSint32: Int32 { + get {return _storage._optionalSint32 ?? 0} + set {_uniqueStorage()._optionalSint32 = newValue} + } + /// Returns true if `optionalSint32` has been explicitly set. + var hasOptionalSint32: Bool {return _storage._optionalSint32 != nil} + /// Clears the value of `optionalSint32`. Subsequent reads from it will return its default value. + mutating func clearOptionalSint32() {_storage._optionalSint32 = nil} + + var optionalSint64: Int64 { + get {return _storage._optionalSint64 ?? 0} + set {_uniqueStorage()._optionalSint64 = newValue} + } + /// Returns true if `optionalSint64` has been explicitly set. + var hasOptionalSint64: Bool {return _storage._optionalSint64 != nil} + /// Clears the value of `optionalSint64`. Subsequent reads from it will return its default value. + mutating func clearOptionalSint64() {_storage._optionalSint64 = nil} + + var optionalFixed32: UInt32 { + get {return _storage._optionalFixed32 ?? 0} + set {_uniqueStorage()._optionalFixed32 = newValue} + } + /// Returns true if `optionalFixed32` has been explicitly set. + var hasOptionalFixed32: Bool {return _storage._optionalFixed32 != nil} + /// Clears the value of `optionalFixed32`. Subsequent reads from it will return its default value. + mutating func clearOptionalFixed32() {_storage._optionalFixed32 = nil} + + var optionalFixed64: UInt64 { + get {return _storage._optionalFixed64 ?? 0} + set {_uniqueStorage()._optionalFixed64 = newValue} + } + /// Returns true if `optionalFixed64` has been explicitly set. + var hasOptionalFixed64: Bool {return _storage._optionalFixed64 != nil} + /// Clears the value of `optionalFixed64`. Subsequent reads from it will return its default value. + mutating func clearOptionalFixed64() {_storage._optionalFixed64 = nil} + + var optionalSfixed32: Int32 { + get {return _storage._optionalSfixed32 ?? 0} + set {_uniqueStorage()._optionalSfixed32 = newValue} + } + /// Returns true if `optionalSfixed32` has been explicitly set. + var hasOptionalSfixed32: Bool {return _storage._optionalSfixed32 != nil} + /// Clears the value of `optionalSfixed32`. Subsequent reads from it will return its default value. + mutating func clearOptionalSfixed32() {_storage._optionalSfixed32 = nil} + + var optionalSfixed64: Int64 { + get {return _storage._optionalSfixed64 ?? 0} + set {_uniqueStorage()._optionalSfixed64 = newValue} + } + /// Returns true if `optionalSfixed64` has been explicitly set. + var hasOptionalSfixed64: Bool {return _storage._optionalSfixed64 != nil} + /// Clears the value of `optionalSfixed64`. Subsequent reads from it will return its default value. + mutating func clearOptionalSfixed64() {_storage._optionalSfixed64 = nil} + + var optionalFloat: Float { + get {return _storage._optionalFloat ?? 0} + set {_uniqueStorage()._optionalFloat = newValue} + } + /// Returns true if `optionalFloat` has been explicitly set. + var hasOptionalFloat: Bool {return _storage._optionalFloat != nil} + /// Clears the value of `optionalFloat`. Subsequent reads from it will return its default value. + mutating func clearOptionalFloat() {_storage._optionalFloat = nil} + + var optionalDouble: Double { + get {return _storage._optionalDouble ?? 0} + set {_uniqueStorage()._optionalDouble = newValue} + } + /// Returns true if `optionalDouble` has been explicitly set. + var hasOptionalDouble: Bool {return _storage._optionalDouble != nil} + /// Clears the value of `optionalDouble`. Subsequent reads from it will return its default value. + mutating func clearOptionalDouble() {_storage._optionalDouble = nil} + + var optionalBool: Bool { + get {return _storage._optionalBool ?? false} + set {_uniqueStorage()._optionalBool = newValue} + } + /// Returns true if `optionalBool` has been explicitly set. + var hasOptionalBool: Bool {return _storage._optionalBool != nil} + /// Clears the value of `optionalBool`. Subsequent reads from it will return its default value. + mutating func clearOptionalBool() {_storage._optionalBool = nil} + + var optionalString: String { + get {return _storage._optionalString ?? String()} + set {_uniqueStorage()._optionalString = newValue} + } + /// Returns true if `optionalString` has been explicitly set. + var hasOptionalString: Bool {return _storage._optionalString != nil} + /// Clears the value of `optionalString`. Subsequent reads from it will return its default value. + mutating func clearOptionalString() {_storage._optionalString = nil} + + var optionalBytes: Data { + get {return _storage._optionalBytes ?? SwiftProtobuf.Internal.emptyData} + set {_uniqueStorage()._optionalBytes = newValue} + } + /// Returns true if `optionalBytes` has been explicitly set. + var hasOptionalBytes: Bool {return _storage._optionalBytes != nil} + /// Clears the value of `optionalBytes`. Subsequent reads from it will return its default value. + mutating func clearOptionalBytes() {_storage._optionalBytes = nil} + + var optionalNestedMessage: ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedMessage { + get {return _storage._optionalNestedMessage ?? ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedMessage()} + set {_uniqueStorage()._optionalNestedMessage = newValue} + } + /// Returns true if `optionalNestedMessage` has been explicitly set. + var hasOptionalNestedMessage: Bool {return _storage._optionalNestedMessage != nil} + /// Clears the value of `optionalNestedMessage`. Subsequent reads from it will return its default value. + mutating func clearOptionalNestedMessage() {_storage._optionalNestedMessage = nil} + + var optionalForeignMessage: ProtobufTestMessages_Proto2_ForeignMessage { + get {return _storage._optionalForeignMessage ?? ProtobufTestMessages_Proto2_ForeignMessage()} + set {_uniqueStorage()._optionalForeignMessage = newValue} + } + /// Returns true if `optionalForeignMessage` has been explicitly set. + var hasOptionalForeignMessage: Bool {return _storage._optionalForeignMessage != nil} + /// Clears the value of `optionalForeignMessage`. Subsequent reads from it will return its default value. + mutating func clearOptionalForeignMessage() {_storage._optionalForeignMessage = nil} + + var optionalNestedEnum: ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedEnum { + get {return _storage._optionalNestedEnum ?? .foo} + set {_uniqueStorage()._optionalNestedEnum = newValue} + } + /// Returns true if `optionalNestedEnum` has been explicitly set. + var hasOptionalNestedEnum: Bool {return _storage._optionalNestedEnum != nil} + /// Clears the value of `optionalNestedEnum`. Subsequent reads from it will return its default value. + mutating func clearOptionalNestedEnum() {_storage._optionalNestedEnum = nil} + + var optionalForeignEnum: ProtobufTestMessages_Proto2_ForeignEnum { + get {return _storage._optionalForeignEnum ?? .foreignFoo} + set {_uniqueStorage()._optionalForeignEnum = newValue} + } + /// Returns true if `optionalForeignEnum` has been explicitly set. + var hasOptionalForeignEnum: Bool {return _storage._optionalForeignEnum != nil} + /// Clears the value of `optionalForeignEnum`. Subsequent reads from it will return its default value. + mutating func clearOptionalForeignEnum() {_storage._optionalForeignEnum = nil} + + var optionalStringPiece: String { + get {return _storage._optionalStringPiece ?? String()} + set {_uniqueStorage()._optionalStringPiece = newValue} + } + /// Returns true if `optionalStringPiece` has been explicitly set. + var hasOptionalStringPiece: Bool {return _storage._optionalStringPiece != nil} + /// Clears the value of `optionalStringPiece`. Subsequent reads from it will return its default value. + mutating func clearOptionalStringPiece() {_storage._optionalStringPiece = nil} + + var optionalCord: String { + get {return _storage._optionalCord ?? String()} + set {_uniqueStorage()._optionalCord = newValue} + } + /// Returns true if `optionalCord` has been explicitly set. + var hasOptionalCord: Bool {return _storage._optionalCord != nil} + /// Clears the value of `optionalCord`. Subsequent reads from it will return its default value. + mutating func clearOptionalCord() {_storage._optionalCord = nil} + + var recursiveMessage: ProtobufTestMessages_Proto2_TestAllTypesProto2 { + get {return _storage._recursiveMessage ?? ProtobufTestMessages_Proto2_TestAllTypesProto2()} + set {_uniqueStorage()._recursiveMessage = newValue} + } + /// Returns true if `recursiveMessage` has been explicitly set. + var hasRecursiveMessage: Bool {return _storage._recursiveMessage != nil} + /// Clears the value of `recursiveMessage`. Subsequent reads from it will return its default value. + mutating func clearRecursiveMessage() {_storage._recursiveMessage = nil} + + /// Repeated + var repeatedInt32: [Int32] { + get {return _storage._repeatedInt32} + set {_uniqueStorage()._repeatedInt32 = newValue} + } + + var repeatedInt64: [Int64] { + get {return _storage._repeatedInt64} + set {_uniqueStorage()._repeatedInt64 = newValue} + } + + var repeatedUint32: [UInt32] { + get {return _storage._repeatedUint32} + set {_uniqueStorage()._repeatedUint32 = newValue} + } + + var repeatedUint64: [UInt64] { + get {return _storage._repeatedUint64} + set {_uniqueStorage()._repeatedUint64 = newValue} + } + + var repeatedSint32: [Int32] { + get {return _storage._repeatedSint32} + set {_uniqueStorage()._repeatedSint32 = newValue} + } + + var repeatedSint64: [Int64] { + get {return _storage._repeatedSint64} + set {_uniqueStorage()._repeatedSint64 = newValue} + } + + var repeatedFixed32: [UInt32] { + get {return _storage._repeatedFixed32} + set {_uniqueStorage()._repeatedFixed32 = newValue} + } + + var repeatedFixed64: [UInt64] { + get {return _storage._repeatedFixed64} + set {_uniqueStorage()._repeatedFixed64 = newValue} + } + + var repeatedSfixed32: [Int32] { + get {return _storage._repeatedSfixed32} + set {_uniqueStorage()._repeatedSfixed32 = newValue} + } + + var repeatedSfixed64: [Int64] { + get {return _storage._repeatedSfixed64} + set {_uniqueStorage()._repeatedSfixed64 = newValue} + } + + var repeatedFloat: [Float] { + get {return _storage._repeatedFloat} + set {_uniqueStorage()._repeatedFloat = newValue} + } + + var repeatedDouble: [Double] { + get {return _storage._repeatedDouble} + set {_uniqueStorage()._repeatedDouble = newValue} + } + + var repeatedBool: [Bool] { + get {return _storage._repeatedBool} + set {_uniqueStorage()._repeatedBool = newValue} + } + + var repeatedString: [String] { + get {return _storage._repeatedString} + set {_uniqueStorage()._repeatedString = newValue} + } + + var repeatedBytes: [Data] { + get {return _storage._repeatedBytes} + set {_uniqueStorage()._repeatedBytes = newValue} + } + + var repeatedNestedMessage: [ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedMessage] { + get {return _storage._repeatedNestedMessage} + set {_uniqueStorage()._repeatedNestedMessage = newValue} + } + + var repeatedForeignMessage: [ProtobufTestMessages_Proto2_ForeignMessage] { + get {return _storage._repeatedForeignMessage} + set {_uniqueStorage()._repeatedForeignMessage = newValue} + } + + var repeatedNestedEnum: [ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedEnum] { + get {return _storage._repeatedNestedEnum} + set {_uniqueStorage()._repeatedNestedEnum = newValue} + } + + var repeatedForeignEnum: [ProtobufTestMessages_Proto2_ForeignEnum] { + get {return _storage._repeatedForeignEnum} + set {_uniqueStorage()._repeatedForeignEnum = newValue} + } + + var repeatedStringPiece: [String] { + get {return _storage._repeatedStringPiece} + set {_uniqueStorage()._repeatedStringPiece = newValue} + } + + var repeatedCord: [String] { + get {return _storage._repeatedCord} + set {_uniqueStorage()._repeatedCord = newValue} + } + + /// Map + var mapInt32Int32: Dictionary { + get {return _storage._mapInt32Int32} + set {_uniqueStorage()._mapInt32Int32 = newValue} + } + + var mapInt64Int64: Dictionary { + get {return _storage._mapInt64Int64} + set {_uniqueStorage()._mapInt64Int64 = newValue} + } + + var mapUint32Uint32: Dictionary { + get {return _storage._mapUint32Uint32} + set {_uniqueStorage()._mapUint32Uint32 = newValue} + } + + var mapUint64Uint64: Dictionary { + get {return _storage._mapUint64Uint64} + set {_uniqueStorage()._mapUint64Uint64 = newValue} + } + + var mapSint32Sint32: Dictionary { + get {return _storage._mapSint32Sint32} + set {_uniqueStorage()._mapSint32Sint32 = newValue} + } + + var mapSint64Sint64: Dictionary { + get {return _storage._mapSint64Sint64} + set {_uniqueStorage()._mapSint64Sint64 = newValue} + } + + var mapFixed32Fixed32: Dictionary { + get {return _storage._mapFixed32Fixed32} + set {_uniqueStorage()._mapFixed32Fixed32 = newValue} + } + + var mapFixed64Fixed64: Dictionary { + get {return _storage._mapFixed64Fixed64} + set {_uniqueStorage()._mapFixed64Fixed64 = newValue} + } + + var mapSfixed32Sfixed32: Dictionary { + get {return _storage._mapSfixed32Sfixed32} + set {_uniqueStorage()._mapSfixed32Sfixed32 = newValue} + } + + var mapSfixed64Sfixed64: Dictionary { + get {return _storage._mapSfixed64Sfixed64} + set {_uniqueStorage()._mapSfixed64Sfixed64 = newValue} + } + + var mapInt32Float: Dictionary { + get {return _storage._mapInt32Float} + set {_uniqueStorage()._mapInt32Float = newValue} + } + + var mapInt32Double: Dictionary { + get {return _storage._mapInt32Double} + set {_uniqueStorage()._mapInt32Double = newValue} + } + + var mapBoolBool: Dictionary { + get {return _storage._mapBoolBool} + set {_uniqueStorage()._mapBoolBool = newValue} + } + + var mapStringString: Dictionary { + get {return _storage._mapStringString} + set {_uniqueStorage()._mapStringString = newValue} + } + + var mapStringBytes: Dictionary { + get {return _storage._mapStringBytes} + set {_uniqueStorage()._mapStringBytes = newValue} + } + + var mapStringNestedMessage: Dictionary { + get {return _storage._mapStringNestedMessage} + set {_uniqueStorage()._mapStringNestedMessage = newValue} + } + + var mapStringForeignMessage: Dictionary { + get {return _storage._mapStringForeignMessage} + set {_uniqueStorage()._mapStringForeignMessage = newValue} + } + + var mapStringNestedEnum: Dictionary { + get {return _storage._mapStringNestedEnum} + set {_uniqueStorage()._mapStringNestedEnum = newValue} + } + + var mapStringForeignEnum: Dictionary { + get {return _storage._mapStringForeignEnum} + set {_uniqueStorage()._mapStringForeignEnum = newValue} + } + + var oneofField: OneOf_OneofField? { + get {return _storage._oneofField} + set {_uniqueStorage()._oneofField = newValue} + } + + var oneofUint32: UInt32 { + get { + if case .oneofUint32(let v)? = _storage._oneofField {return v} + return 0 + } + set {_uniqueStorage()._oneofField = .oneofUint32(newValue)} + } + + var oneofNestedMessage: ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedMessage { + get { + if case .oneofNestedMessage(let v)? = _storage._oneofField {return v} + return ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedMessage() + } + set {_uniqueStorage()._oneofField = .oneofNestedMessage(newValue)} + } + + var oneofString: String { + get { + if case .oneofString(let v)? = _storage._oneofField {return v} + return String() + } + set {_uniqueStorage()._oneofField = .oneofString(newValue)} + } + + var oneofBytes: Data { + get { + if case .oneofBytes(let v)? = _storage._oneofField {return v} + return SwiftProtobuf.Internal.emptyData + } + set {_uniqueStorage()._oneofField = .oneofBytes(newValue)} + } + + var oneofBool: Bool { + get { + if case .oneofBool(let v)? = _storage._oneofField {return v} + return false + } + set {_uniqueStorage()._oneofField = .oneofBool(newValue)} + } + + var oneofUint64: UInt64 { + get { + if case .oneofUint64(let v)? = _storage._oneofField {return v} + return 0 + } + set {_uniqueStorage()._oneofField = .oneofUint64(newValue)} + } + + var oneofFloat: Float { + get { + if case .oneofFloat(let v)? = _storage._oneofField {return v} + return 0 + } + set {_uniqueStorage()._oneofField = .oneofFloat(newValue)} + } + + var oneofDouble: Double { + get { + if case .oneofDouble(let v)? = _storage._oneofField {return v} + return 0 + } + set {_uniqueStorage()._oneofField = .oneofDouble(newValue)} + } + + var oneofEnum: ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedEnum { + get { + if case .oneofEnum(let v)? = _storage._oneofField {return v} + return .foo + } + set {_uniqueStorage()._oneofField = .oneofEnum(newValue)} + } + + var data: ProtobufTestMessages_Proto2_TestAllTypesProto2.DataMessage { + get {return _storage._data ?? ProtobufTestMessages_Proto2_TestAllTypesProto2.DataMessage()} + set {_uniqueStorage()._data = newValue} + } + /// Returns true if `data` has been explicitly set. + var hasData: Bool {return _storage._data != nil} + /// Clears the value of `data`. Subsequent reads from it will return its default value. + mutating func clearData() {_storage._data = nil} + + /// Test field-name-to-JSON-name convention. + /// (protobuf says names can be any valid C/C++ identifier.) + var fieldname1: Int32 { + get {return _storage._fieldname1 ?? 0} + set {_uniqueStorage()._fieldname1 = newValue} + } + /// Returns true if `fieldname1` has been explicitly set. + var hasFieldname1: Bool {return _storage._fieldname1 != nil} + /// Clears the value of `fieldname1`. Subsequent reads from it will return its default value. + mutating func clearFieldname1() {_storage._fieldname1 = nil} + + var fieldName2: Int32 { + get {return _storage._fieldName2 ?? 0} + set {_uniqueStorage()._fieldName2 = newValue} + } + /// Returns true if `fieldName2` has been explicitly set. + var hasFieldName2: Bool {return _storage._fieldName2 != nil} + /// Clears the value of `fieldName2`. Subsequent reads from it will return its default value. + mutating func clearFieldName2() {_storage._fieldName2 = nil} + + var fieldName3: Int32 { + get {return _storage._fieldName3 ?? 0} + set {_uniqueStorage()._fieldName3 = newValue} + } + /// Returns true if `fieldName3` has been explicitly set. + var hasFieldName3: Bool {return _storage._fieldName3 != nil} + /// Clears the value of `fieldName3`. Subsequent reads from it will return its default value. + mutating func clearFieldName3() {_storage._fieldName3 = nil} + + var field_Name4_: Int32 { + get {return _storage._field_Name4_ ?? 0} + set {_uniqueStorage()._field_Name4_ = newValue} + } + /// Returns true if `field_Name4_` has been explicitly set. + var hasField_Name4_: Bool {return _storage._field_Name4_ != nil} + /// Clears the value of `field_Name4_`. Subsequent reads from it will return its default value. + mutating func clearField_Name4_() {_storage._field_Name4_ = nil} + + var field0Name5: Int32 { + get {return _storage._field0Name5 ?? 0} + set {_uniqueStorage()._field0Name5 = newValue} + } + /// Returns true if `field0Name5` has been explicitly set. + var hasField0Name5: Bool {return _storage._field0Name5 != nil} + /// Clears the value of `field0Name5`. Subsequent reads from it will return its default value. + mutating func clearField0Name5() {_storage._field0Name5 = nil} + + var field0Name6: Int32 { + get {return _storage._field0Name6 ?? 0} + set {_uniqueStorage()._field0Name6 = newValue} + } + /// Returns true if `field0Name6` has been explicitly set. + var hasField0Name6: Bool {return _storage._field0Name6 != nil} + /// Clears the value of `field0Name6`. Subsequent reads from it will return its default value. + mutating func clearField0Name6() {_storage._field0Name6 = nil} + + var fieldName7: Int32 { + get {return _storage._fieldName7 ?? 0} + set {_uniqueStorage()._fieldName7 = newValue} + } + /// Returns true if `fieldName7` has been explicitly set. + var hasFieldName7: Bool {return _storage._fieldName7 != nil} + /// Clears the value of `fieldName7`. Subsequent reads from it will return its default value. + mutating func clearFieldName7() {_storage._fieldName7 = nil} + + var fieldName8: Int32 { + get {return _storage._fieldName8 ?? 0} + set {_uniqueStorage()._fieldName8 = newValue} + } + /// Returns true if `fieldName8` has been explicitly set. + var hasFieldName8: Bool {return _storage._fieldName8 != nil} + /// Clears the value of `fieldName8`. Subsequent reads from it will return its default value. + mutating func clearFieldName8() {_storage._fieldName8 = nil} + + var fieldName9: Int32 { + get {return _storage._fieldName9 ?? 0} + set {_uniqueStorage()._fieldName9 = newValue} + } + /// Returns true if `fieldName9` has been explicitly set. + var hasFieldName9: Bool {return _storage._fieldName9 != nil} + /// Clears the value of `fieldName9`. Subsequent reads from it will return its default value. + mutating func clearFieldName9() {_storage._fieldName9 = nil} + + var fieldName10: Int32 { + get {return _storage._fieldName10 ?? 0} + set {_uniqueStorage()._fieldName10 = newValue} + } + /// Returns true if `fieldName10` has been explicitly set. + var hasFieldName10: Bool {return _storage._fieldName10 != nil} + /// Clears the value of `fieldName10`. Subsequent reads from it will return its default value. + mutating func clearFieldName10() {_storage._fieldName10 = nil} + + var fieldName11: Int32 { + get {return _storage._fieldName11 ?? 0} + set {_uniqueStorage()._fieldName11 = newValue} + } + /// Returns true if `fieldName11` has been explicitly set. + var hasFieldName11: Bool {return _storage._fieldName11 != nil} + /// Clears the value of `fieldName11`. Subsequent reads from it will return its default value. + mutating func clearFieldName11() {_storage._fieldName11 = nil} + + var fieldName12: Int32 { + get {return _storage._fieldName12 ?? 0} + set {_uniqueStorage()._fieldName12 = newValue} + } + /// Returns true if `fieldName12` has been explicitly set. + var hasFieldName12: Bool {return _storage._fieldName12 != nil} + /// Clears the value of `fieldName12`. Subsequent reads from it will return its default value. + mutating func clearFieldName12() {_storage._fieldName12 = nil} + + var _FieldName13: Int32 { + get {return _storage.__FieldName13 ?? 0} + set {_uniqueStorage().__FieldName13 = newValue} + } + /// Returns true if `_FieldName13` has been explicitly set. + var has_FieldName13: Bool {return _storage.__FieldName13 != nil} + /// Clears the value of `_FieldName13`. Subsequent reads from it will return its default value. + mutating func clear_FieldName13() {_storage.__FieldName13 = nil} + + var _FieldName14: Int32 { + get {return _storage.__FieldName14 ?? 0} + set {_uniqueStorage().__FieldName14 = newValue} + } + /// Returns true if `_FieldName14` has been explicitly set. + var has_FieldName14: Bool {return _storage.__FieldName14 != nil} + /// Clears the value of `_FieldName14`. Subsequent reads from it will return its default value. + mutating func clear_FieldName14() {_storage.__FieldName14 = nil} + + var field_Name15: Int32 { + get {return _storage._field_Name15 ?? 0} + set {_uniqueStorage()._field_Name15 = newValue} + } + /// Returns true if `field_Name15` has been explicitly set. + var hasField_Name15: Bool {return _storage._field_Name15 != nil} + /// Clears the value of `field_Name15`. Subsequent reads from it will return its default value. + mutating func clearField_Name15() {_storage._field_Name15 = nil} + + var field_Name16: Int32 { + get {return _storage._field_Name16 ?? 0} + set {_uniqueStorage()._field_Name16 = newValue} + } + /// Returns true if `field_Name16` has been explicitly set. + var hasField_Name16: Bool {return _storage._field_Name16 != nil} + /// Clears the value of `field_Name16`. Subsequent reads from it will return its default value. + mutating func clearField_Name16() {_storage._field_Name16 = nil} + + var fieldName17__: Int32 { + get {return _storage._fieldName17__ ?? 0} + set {_uniqueStorage()._fieldName17__ = newValue} + } + /// Returns true if `fieldName17__` has been explicitly set. + var hasFieldName17__: Bool {return _storage._fieldName17__ != nil} + /// Clears the value of `fieldName17__`. Subsequent reads from it will return its default value. + mutating func clearFieldName17__() {_storage._fieldName17__ = nil} + + var fieldName18__: Int32 { + get {return _storage._fieldName18__ ?? 0} + set {_uniqueStorage()._fieldName18__ = newValue} + } + /// Returns true if `fieldName18__` has been explicitly set. + var hasFieldName18__: Bool {return _storage._fieldName18__ != nil} + /// Clears the value of `fieldName18__`. Subsequent reads from it will return its default value. + mutating func clearFieldName18__() {_storage._fieldName18__ = nil} + + var unknownFields = SwiftProtobuf.UnknownStorage() + + enum OneOf_OneofField: Equatable { + case oneofUint32(UInt32) + case oneofNestedMessage(ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedMessage) + case oneofString(String) + case oneofBytes(Data) + case oneofBool(Bool) + case oneofUint64(UInt64) + case oneofFloat(Float) + case oneofDouble(Double) + case oneofEnum(ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedEnum) + + static func ==(lhs: ProtobufTestMessages_Proto2_TestAllTypesProto2.OneOf_OneofField, rhs: ProtobufTestMessages_Proto2_TestAllTypesProto2.OneOf_OneofField) -> Bool { + switch (lhs, rhs) { + case (.oneofUint32(let l), .oneofUint32(let r)): return l == r + case (.oneofNestedMessage(let l), .oneofNestedMessage(let r)): return l == r + case (.oneofString(let l), .oneofString(let r)): return l == r + case (.oneofBytes(let l), .oneofBytes(let r)): return l == r + case (.oneofBool(let l), .oneofBool(let r)): return l == r + case (.oneofUint64(let l), .oneofUint64(let r)): return l == r + case (.oneofFloat(let l), .oneofFloat(let r)): return l == r + case (.oneofDouble(let l), .oneofDouble(let r)): return l == r + case (.oneofEnum(let l), .oneofEnum(let r)): return l == r + default: return false + } + } + } + + enum NestedEnum: SwiftProtobuf.Enum { + typealias RawValue = Int + case foo // = 0 + case bar // = 1 + case baz // = 2 + + /// Intentionally negative. + case neg // = -1 + + init() { + self = .foo + } + + init?(rawValue: Int) { + switch rawValue { + case -1: self = .neg + case 0: self = .foo + case 1: self = .bar + case 2: self = .baz + default: return nil + } + } + + var rawValue: Int { + switch self { + case .neg: return -1 + case .foo: return 0 + case .bar: return 1 + case .baz: return 2 + } + } + + } + + struct NestedMessage: SwiftProtobuf.Message { + static let protoMessageName: String = ProtobufTestMessages_Proto2_TestAllTypesProto2.protoMessageName + ".NestedMessage" + + var a: Int32 { + get {return _storage._a ?? 0} + set {_uniqueStorage()._a = newValue} + } + /// Returns true if `a` has been explicitly set. + var hasA: Bool {return _storage._a != nil} + /// Clears the value of `a`. Subsequent reads from it will return its default value. + mutating func clearA() {_storage._a = nil} + + var corecursive: ProtobufTestMessages_Proto2_TestAllTypesProto2 { + get {return _storage._corecursive ?? ProtobufTestMessages_Proto2_TestAllTypesProto2()} + set {_uniqueStorage()._corecursive = newValue} + } + /// Returns true if `corecursive` has been explicitly set. + var hasCorecursive: Bool {return _storage._corecursive != nil} + /// Clears the value of `corecursive`. Subsequent reads from it will return its default value. + mutating func clearCorecursive() {_storage._corecursive = nil} + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + public var isInitialized: Bool { + return withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if let v = _storage._corecursive, !v.isInitialized {return false} + return true + } + } + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularInt32Field(value: &_storage._a) + case 2: try decoder.decodeSingularMessageField(value: &_storage._corecursive) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if let v = _storage._a { + try visitor.visitSingularInt32Field(value: v, fieldNumber: 1) + } + if let v = _storage._corecursive { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance + } + + /// groups + struct DataMessage: SwiftProtobuf.Message { + static let protoMessageName: String = ProtobufTestMessages_Proto2_TestAllTypesProto2.protoMessageName + ".Data" + + var groupInt32: Int32 { + get {return _groupInt32 ?? 0} + set {_groupInt32 = newValue} + } + /// Returns true if `groupInt32` has been explicitly set. + var hasGroupInt32: Bool {return self._groupInt32 != nil} + /// Clears the value of `groupInt32`. Subsequent reads from it will return its default value. + mutating func clearGroupInt32() {self._groupInt32 = nil} + + var groupUint32: UInt32 { + get {return _groupUint32 ?? 0} + set {_groupUint32 = newValue} + } + /// Returns true if `groupUint32` has been explicitly set. + var hasGroupUint32: Bool {return self._groupUint32 != nil} + /// Clears the value of `groupUint32`. Subsequent reads from it will return its default value. + mutating func clearGroupUint32() {self._groupUint32 = nil} + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 202: try decoder.decodeSingularInt32Field(value: &self._groupInt32) + case 203: try decoder.decodeSingularUInt32Field(value: &self._groupUint32) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + func traverse(visitor: inout V) throws { + if let v = self._groupInt32 { + try visitor.visitSingularInt32Field(value: v, fieldNumber: 202) + } + if let v = self._groupUint32 { + try visitor.visitSingularUInt32Field(value: v, fieldNumber: 203) + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _groupInt32: Int32? = nil + fileprivate var _groupUint32: UInt32? = nil + } + + /// message_set test case. + struct MessageSetCorrect: SwiftProtobuf.Message, SwiftProtobuf.ExtensibleMessage { + static let protoMessageName: String = ProtobufTestMessages_Proto2_TestAllTypesProto2.protoMessageName + ".MessageSetCorrect" + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + public var isInitialized: Bool { + if !_protobuf_extensionFieldValues.isInitialized {return false} + return true + } + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + mutating func decodeMessage(decoder: inout D) throws { + try decoder.decodeExtensionFieldsAsMessageSet(values: &_protobuf_extensionFieldValues, messageType: MessageSetCorrect.self) + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + func traverse(visitor: inout V) throws { + try visitor.visitExtensionFieldsAsMessageSet(fields: _protobuf_extensionFieldValues, start: 4, end: 2147483647) + try unknownFields.traverse(visitor: &visitor) + } + + var _protobuf_extensionFieldValues = SwiftProtobuf.ExtensionFieldValueSet() + } + + struct MessageSetCorrectExtension1: SwiftProtobuf.Message { + static let protoMessageName: String = ProtobufTestMessages_Proto2_TestAllTypesProto2.protoMessageName + ".MessageSetCorrectExtension1" + + var str: String { + get {return _str ?? String()} + set {_str = newValue} + } + /// Returns true if `str` has been explicitly set. + var hasStr: Bool {return self._str != nil} + /// Clears the value of `str`. Subsequent reads from it will return its default value. + mutating func clearStr() {self._str = nil} + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 25: try decoder.decodeSingularStringField(value: &self._str) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + func traverse(visitor: inout V) throws { + if let v = self._str { + try visitor.visitSingularStringField(value: v, fieldNumber: 25) + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _str: String? = nil + } + + struct MessageSetCorrectExtension2: SwiftProtobuf.Message { + static let protoMessageName: String = ProtobufTestMessages_Proto2_TestAllTypesProto2.protoMessageName + ".MessageSetCorrectExtension2" + + var i: Int32 { + get {return _i ?? 0} + set {_i = newValue} + } + /// Returns true if `i` has been explicitly set. + var hasI: Bool {return self._i != nil} + /// Clears the value of `i`. Subsequent reads from it will return its default value. + mutating func clearI() {self._i = nil} + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 9: try decoder.decodeSingularInt32Field(value: &self._i) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + func traverse(visitor: inout V) throws { + if let v = self._i { + try visitor.visitSingularInt32Field(value: v, fieldNumber: 9) + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _i: Int32? = nil + } + + init() {} + + public var isInitialized: Bool { + if !_protobuf_extensionFieldValues.isInitialized {return false} + return withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if let v = _storage._optionalNestedMessage, !v.isInitialized {return false} + if let v = _storage._recursiveMessage, !v.isInitialized {return false} + if !SwiftProtobuf.Internal.areAllInitialized(_storage._repeatedNestedMessage) {return false} + if !SwiftProtobuf.Internal.areAllInitialized(_storage._mapStringNestedMessage) {return false} + if case .oneofNestedMessage(let v)? = _storage._oneofField, !v.isInitialized {return false} + return true + } + } + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularInt32Field(value: &_storage._optionalInt32) + case 2: try decoder.decodeSingularInt64Field(value: &_storage._optionalInt64) + case 3: try decoder.decodeSingularUInt32Field(value: &_storage._optionalUint32) + case 4: try decoder.decodeSingularUInt64Field(value: &_storage._optionalUint64) + case 5: try decoder.decodeSingularSInt32Field(value: &_storage._optionalSint32) + case 6: try decoder.decodeSingularSInt64Field(value: &_storage._optionalSint64) + case 7: try decoder.decodeSingularFixed32Field(value: &_storage._optionalFixed32) + case 8: try decoder.decodeSingularFixed64Field(value: &_storage._optionalFixed64) + case 9: try decoder.decodeSingularSFixed32Field(value: &_storage._optionalSfixed32) + case 10: try decoder.decodeSingularSFixed64Field(value: &_storage._optionalSfixed64) + case 11: try decoder.decodeSingularFloatField(value: &_storage._optionalFloat) + case 12: try decoder.decodeSingularDoubleField(value: &_storage._optionalDouble) + case 13: try decoder.decodeSingularBoolField(value: &_storage._optionalBool) + case 14: try decoder.decodeSingularStringField(value: &_storage._optionalString) + case 15: try decoder.decodeSingularBytesField(value: &_storage._optionalBytes) + case 18: try decoder.decodeSingularMessageField(value: &_storage._optionalNestedMessage) + case 19: try decoder.decodeSingularMessageField(value: &_storage._optionalForeignMessage) + case 21: try decoder.decodeSingularEnumField(value: &_storage._optionalNestedEnum) + case 22: try decoder.decodeSingularEnumField(value: &_storage._optionalForeignEnum) + case 24: try decoder.decodeSingularStringField(value: &_storage._optionalStringPiece) + case 25: try decoder.decodeSingularStringField(value: &_storage._optionalCord) + case 27: try decoder.decodeSingularMessageField(value: &_storage._recursiveMessage) + case 31: try decoder.decodeRepeatedInt32Field(value: &_storage._repeatedInt32) + case 32: try decoder.decodeRepeatedInt64Field(value: &_storage._repeatedInt64) + case 33: try decoder.decodeRepeatedUInt32Field(value: &_storage._repeatedUint32) + case 34: try decoder.decodeRepeatedUInt64Field(value: &_storage._repeatedUint64) + case 35: try decoder.decodeRepeatedSInt32Field(value: &_storage._repeatedSint32) + case 36: try decoder.decodeRepeatedSInt64Field(value: &_storage._repeatedSint64) + case 37: try decoder.decodeRepeatedFixed32Field(value: &_storage._repeatedFixed32) + case 38: try decoder.decodeRepeatedFixed64Field(value: &_storage._repeatedFixed64) + case 39: try decoder.decodeRepeatedSFixed32Field(value: &_storage._repeatedSfixed32) + case 40: try decoder.decodeRepeatedSFixed64Field(value: &_storage._repeatedSfixed64) + case 41: try decoder.decodeRepeatedFloatField(value: &_storage._repeatedFloat) + case 42: try decoder.decodeRepeatedDoubleField(value: &_storage._repeatedDouble) + case 43: try decoder.decodeRepeatedBoolField(value: &_storage._repeatedBool) + case 44: try decoder.decodeRepeatedStringField(value: &_storage._repeatedString) + case 45: try decoder.decodeRepeatedBytesField(value: &_storage._repeatedBytes) + case 48: try decoder.decodeRepeatedMessageField(value: &_storage._repeatedNestedMessage) + case 49: try decoder.decodeRepeatedMessageField(value: &_storage._repeatedForeignMessage) + case 51: try decoder.decodeRepeatedEnumField(value: &_storage._repeatedNestedEnum) + case 52: try decoder.decodeRepeatedEnumField(value: &_storage._repeatedForeignEnum) + case 54: try decoder.decodeRepeatedStringField(value: &_storage._repeatedStringPiece) + case 55: try decoder.decodeRepeatedStringField(value: &_storage._repeatedCord) + case 56: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: &_storage._mapInt32Int32) + case 57: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: &_storage._mapInt64Int64) + case 58: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: &_storage._mapUint32Uint32) + case 59: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: &_storage._mapUint64Uint64) + case 60: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: &_storage._mapSint32Sint32) + case 61: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: &_storage._mapSint64Sint64) + case 62: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: &_storage._mapFixed32Fixed32) + case 63: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: &_storage._mapFixed64Fixed64) + case 64: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: &_storage._mapSfixed32Sfixed32) + case 65: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: &_storage._mapSfixed64Sfixed64) + case 66: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: &_storage._mapInt32Float) + case 67: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: &_storage._mapInt32Double) + case 68: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: &_storage._mapBoolBool) + case 69: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: &_storage._mapStringString) + case 70: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: &_storage._mapStringBytes) + case 71: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: &_storage._mapStringNestedMessage) + case 72: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: &_storage._mapStringForeignMessage) + case 73: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufEnumMap.self, value: &_storage._mapStringNestedEnum) + case 74: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufEnumMap.self, value: &_storage._mapStringForeignEnum) + case 111: + if _storage._oneofField != nil {try decoder.handleConflictingOneOf()} + var v: UInt32? + try decoder.decodeSingularUInt32Field(value: &v) + if let v = v {_storage._oneofField = .oneofUint32(v)} + case 112: + var v: ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedMessage? + if let current = _storage._oneofField { + try decoder.handleConflictingOneOf() + if case .oneofNestedMessage(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneofField = .oneofNestedMessage(v)} + case 113: + if _storage._oneofField != nil {try decoder.handleConflictingOneOf()} + var v: String? + try decoder.decodeSingularStringField(value: &v) + if let v = v {_storage._oneofField = .oneofString(v)} + case 114: + if _storage._oneofField != nil {try decoder.handleConflictingOneOf()} + var v: Data? + try decoder.decodeSingularBytesField(value: &v) + if let v = v {_storage._oneofField = .oneofBytes(v)} + case 115: + if _storage._oneofField != nil {try decoder.handleConflictingOneOf()} + var v: Bool? + try decoder.decodeSingularBoolField(value: &v) + if let v = v {_storage._oneofField = .oneofBool(v)} + case 116: + if _storage._oneofField != nil {try decoder.handleConflictingOneOf()} + var v: UInt64? + try decoder.decodeSingularUInt64Field(value: &v) + if let v = v {_storage._oneofField = .oneofUint64(v)} + case 117: + if _storage._oneofField != nil {try decoder.handleConflictingOneOf()} + var v: Float? + try decoder.decodeSingularFloatField(value: &v) + if let v = v {_storage._oneofField = .oneofFloat(v)} + case 118: + if _storage._oneofField != nil {try decoder.handleConflictingOneOf()} + var v: Double? + try decoder.decodeSingularDoubleField(value: &v) + if let v = v {_storage._oneofField = .oneofDouble(v)} + case 119: + if _storage._oneofField != nil {try decoder.handleConflictingOneOf()} + var v: ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedEnum? + try decoder.decodeSingularEnumField(value: &v) + if let v = v {_storage._oneofField = .oneofEnum(v)} + case 201: try decoder.decodeSingularGroupField(value: &_storage._data) + case 401: try decoder.decodeSingularInt32Field(value: &_storage._fieldname1) + case 402: try decoder.decodeSingularInt32Field(value: &_storage._fieldName2) + case 403: try decoder.decodeSingularInt32Field(value: &_storage._fieldName3) + case 404: try decoder.decodeSingularInt32Field(value: &_storage._field_Name4_) + case 405: try decoder.decodeSingularInt32Field(value: &_storage._field0Name5) + case 406: try decoder.decodeSingularInt32Field(value: &_storage._field0Name6) + case 407: try decoder.decodeSingularInt32Field(value: &_storage._fieldName7) + case 408: try decoder.decodeSingularInt32Field(value: &_storage._fieldName8) + case 409: try decoder.decodeSingularInt32Field(value: &_storage._fieldName9) + case 410: try decoder.decodeSingularInt32Field(value: &_storage._fieldName10) + case 411: try decoder.decodeSingularInt32Field(value: &_storage._fieldName11) + case 412: try decoder.decodeSingularInt32Field(value: &_storage._fieldName12) + case 413: try decoder.decodeSingularInt32Field(value: &_storage.__FieldName13) + case 414: try decoder.decodeSingularInt32Field(value: &_storage.__FieldName14) + case 415: try decoder.decodeSingularInt32Field(value: &_storage._field_Name15) + case 416: try decoder.decodeSingularInt32Field(value: &_storage._field_Name16) + case 417: try decoder.decodeSingularInt32Field(value: &_storage._fieldName17__) + case 418: try decoder.decodeSingularInt32Field(value: &_storage._fieldName18__) + case 120..<201: + try decoder.decodeExtensionField(values: &_protobuf_extensionFieldValues, messageType: ProtobufTestMessages_Proto2_TestAllTypesProto2.self, fieldNumber: fieldNumber) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if let v = _storage._optionalInt32 { + try visitor.visitSingularInt32Field(value: v, fieldNumber: 1) + } + if let v = _storage._optionalInt64 { + try visitor.visitSingularInt64Field(value: v, fieldNumber: 2) + } + if let v = _storage._optionalUint32 { + try visitor.visitSingularUInt32Field(value: v, fieldNumber: 3) + } + if let v = _storage._optionalUint64 { + try visitor.visitSingularUInt64Field(value: v, fieldNumber: 4) + } + if let v = _storage._optionalSint32 { + try visitor.visitSingularSInt32Field(value: v, fieldNumber: 5) + } + if let v = _storage._optionalSint64 { + try visitor.visitSingularSInt64Field(value: v, fieldNumber: 6) + } + if let v = _storage._optionalFixed32 { + try visitor.visitSingularFixed32Field(value: v, fieldNumber: 7) + } + if let v = _storage._optionalFixed64 { + try visitor.visitSingularFixed64Field(value: v, fieldNumber: 8) + } + if let v = _storage._optionalSfixed32 { + try visitor.visitSingularSFixed32Field(value: v, fieldNumber: 9) + } + if let v = _storage._optionalSfixed64 { + try visitor.visitSingularSFixed64Field(value: v, fieldNumber: 10) + } + if let v = _storage._optionalFloat { + try visitor.visitSingularFloatField(value: v, fieldNumber: 11) + } + if let v = _storage._optionalDouble { + try visitor.visitSingularDoubleField(value: v, fieldNumber: 12) + } + if let v = _storage._optionalBool { + try visitor.visitSingularBoolField(value: v, fieldNumber: 13) + } + if let v = _storage._optionalString { + try visitor.visitSingularStringField(value: v, fieldNumber: 14) + } + if let v = _storage._optionalBytes { + try visitor.visitSingularBytesField(value: v, fieldNumber: 15) + } + if let v = _storage._optionalNestedMessage { + try visitor.visitSingularMessageField(value: v, fieldNumber: 18) + } + if let v = _storage._optionalForeignMessage { + try visitor.visitSingularMessageField(value: v, fieldNumber: 19) + } + if let v = _storage._optionalNestedEnum { + try visitor.visitSingularEnumField(value: v, fieldNumber: 21) + } + if let v = _storage._optionalForeignEnum { + try visitor.visitSingularEnumField(value: v, fieldNumber: 22) + } + if let v = _storage._optionalStringPiece { + try visitor.visitSingularStringField(value: v, fieldNumber: 24) + } + if let v = _storage._optionalCord { + try visitor.visitSingularStringField(value: v, fieldNumber: 25) + } + if let v = _storage._recursiveMessage { + try visitor.visitSingularMessageField(value: v, fieldNumber: 27) + } + if !_storage._repeatedInt32.isEmpty { + try visitor.visitRepeatedInt32Field(value: _storage._repeatedInt32, fieldNumber: 31) + } + if !_storage._repeatedInt64.isEmpty { + try visitor.visitRepeatedInt64Field(value: _storage._repeatedInt64, fieldNumber: 32) + } + if !_storage._repeatedUint32.isEmpty { + try visitor.visitRepeatedUInt32Field(value: _storage._repeatedUint32, fieldNumber: 33) + } + if !_storage._repeatedUint64.isEmpty { + try visitor.visitRepeatedUInt64Field(value: _storage._repeatedUint64, fieldNumber: 34) + } + if !_storage._repeatedSint32.isEmpty { + try visitor.visitRepeatedSInt32Field(value: _storage._repeatedSint32, fieldNumber: 35) + } + if !_storage._repeatedSint64.isEmpty { + try visitor.visitRepeatedSInt64Field(value: _storage._repeatedSint64, fieldNumber: 36) + } + if !_storage._repeatedFixed32.isEmpty { + try visitor.visitRepeatedFixed32Field(value: _storage._repeatedFixed32, fieldNumber: 37) + } + if !_storage._repeatedFixed64.isEmpty { + try visitor.visitRepeatedFixed64Field(value: _storage._repeatedFixed64, fieldNumber: 38) + } + if !_storage._repeatedSfixed32.isEmpty { + try visitor.visitRepeatedSFixed32Field(value: _storage._repeatedSfixed32, fieldNumber: 39) + } + if !_storage._repeatedSfixed64.isEmpty { + try visitor.visitRepeatedSFixed64Field(value: _storage._repeatedSfixed64, fieldNumber: 40) + } + if !_storage._repeatedFloat.isEmpty { + try visitor.visitRepeatedFloatField(value: _storage._repeatedFloat, fieldNumber: 41) + } + if !_storage._repeatedDouble.isEmpty { + try visitor.visitRepeatedDoubleField(value: _storage._repeatedDouble, fieldNumber: 42) + } + if !_storage._repeatedBool.isEmpty { + try visitor.visitRepeatedBoolField(value: _storage._repeatedBool, fieldNumber: 43) + } + if !_storage._repeatedString.isEmpty { + try visitor.visitRepeatedStringField(value: _storage._repeatedString, fieldNumber: 44) + } + if !_storage._repeatedBytes.isEmpty { + try visitor.visitRepeatedBytesField(value: _storage._repeatedBytes, fieldNumber: 45) + } + if !_storage._repeatedNestedMessage.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._repeatedNestedMessage, fieldNumber: 48) + } + if !_storage._repeatedForeignMessage.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._repeatedForeignMessage, fieldNumber: 49) + } + if !_storage._repeatedNestedEnum.isEmpty { + try visitor.visitRepeatedEnumField(value: _storage._repeatedNestedEnum, fieldNumber: 51) + } + if !_storage._repeatedForeignEnum.isEmpty { + try visitor.visitRepeatedEnumField(value: _storage._repeatedForeignEnum, fieldNumber: 52) + } + if !_storage._repeatedStringPiece.isEmpty { + try visitor.visitRepeatedStringField(value: _storage._repeatedStringPiece, fieldNumber: 54) + } + if !_storage._repeatedCord.isEmpty { + try visitor.visitRepeatedStringField(value: _storage._repeatedCord, fieldNumber: 55) + } + if !_storage._mapInt32Int32.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: _storage._mapInt32Int32, fieldNumber: 56) + } + if !_storage._mapInt64Int64.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: _storage._mapInt64Int64, fieldNumber: 57) + } + if !_storage._mapUint32Uint32.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: _storage._mapUint32Uint32, fieldNumber: 58) + } + if !_storage._mapUint64Uint64.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: _storage._mapUint64Uint64, fieldNumber: 59) + } + if !_storage._mapSint32Sint32.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: _storage._mapSint32Sint32, fieldNumber: 60) + } + if !_storage._mapSint64Sint64.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: _storage._mapSint64Sint64, fieldNumber: 61) + } + if !_storage._mapFixed32Fixed32.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: _storage._mapFixed32Fixed32, fieldNumber: 62) + } + if !_storage._mapFixed64Fixed64.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: _storage._mapFixed64Fixed64, fieldNumber: 63) + } + if !_storage._mapSfixed32Sfixed32.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: _storage._mapSfixed32Sfixed32, fieldNumber: 64) + } + if !_storage._mapSfixed64Sfixed64.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: _storage._mapSfixed64Sfixed64, fieldNumber: 65) + } + if !_storage._mapInt32Float.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: _storage._mapInt32Float, fieldNumber: 66) + } + if !_storage._mapInt32Double.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: _storage._mapInt32Double, fieldNumber: 67) + } + if !_storage._mapBoolBool.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: _storage._mapBoolBool, fieldNumber: 68) + } + if !_storage._mapStringString.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: _storage._mapStringString, fieldNumber: 69) + } + if !_storage._mapStringBytes.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: _storage._mapStringBytes, fieldNumber: 70) + } + if !_storage._mapStringNestedMessage.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: _storage._mapStringNestedMessage, fieldNumber: 71) + } + if !_storage._mapStringForeignMessage.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: _storage._mapStringForeignMessage, fieldNumber: 72) + } + if !_storage._mapStringNestedEnum.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufEnumMap.self, value: _storage._mapStringNestedEnum, fieldNumber: 73) + } + if !_storage._mapStringForeignEnum.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufEnumMap.self, value: _storage._mapStringForeignEnum, fieldNumber: 74) + } + switch _storage._oneofField { + case .oneofUint32(let v)?: + try visitor.visitSingularUInt32Field(value: v, fieldNumber: 111) + case .oneofNestedMessage(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 112) + case .oneofString(let v)?: + try visitor.visitSingularStringField(value: v, fieldNumber: 113) + case .oneofBytes(let v)?: + try visitor.visitSingularBytesField(value: v, fieldNumber: 114) + case .oneofBool(let v)?: + try visitor.visitSingularBoolField(value: v, fieldNumber: 115) + case .oneofUint64(let v)?: + try visitor.visitSingularUInt64Field(value: v, fieldNumber: 116) + case .oneofFloat(let v)?: + try visitor.visitSingularFloatField(value: v, fieldNumber: 117) + case .oneofDouble(let v)?: + try visitor.visitSingularDoubleField(value: v, fieldNumber: 118) + case .oneofEnum(let v)?: + try visitor.visitSingularEnumField(value: v, fieldNumber: 119) + case nil: break + } + try visitor.visitExtensionFields(fields: _protobuf_extensionFieldValues, start: 120, end: 201) + if let v = _storage._data { + try visitor.visitSingularGroupField(value: v, fieldNumber: 201) + } + if let v = _storage._fieldname1 { + try visitor.visitSingularInt32Field(value: v, fieldNumber: 401) + } + if let v = _storage._fieldName2 { + try visitor.visitSingularInt32Field(value: v, fieldNumber: 402) + } + if let v = _storage._fieldName3 { + try visitor.visitSingularInt32Field(value: v, fieldNumber: 403) + } + if let v = _storage._field_Name4_ { + try visitor.visitSingularInt32Field(value: v, fieldNumber: 404) + } + if let v = _storage._field0Name5 { + try visitor.visitSingularInt32Field(value: v, fieldNumber: 405) + } + if let v = _storage._field0Name6 { + try visitor.visitSingularInt32Field(value: v, fieldNumber: 406) + } + if let v = _storage._fieldName7 { + try visitor.visitSingularInt32Field(value: v, fieldNumber: 407) + } + if let v = _storage._fieldName8 { + try visitor.visitSingularInt32Field(value: v, fieldNumber: 408) + } + if let v = _storage._fieldName9 { + try visitor.visitSingularInt32Field(value: v, fieldNumber: 409) + } + if let v = _storage._fieldName10 { + try visitor.visitSingularInt32Field(value: v, fieldNumber: 410) + } + if let v = _storage._fieldName11 { + try visitor.visitSingularInt32Field(value: v, fieldNumber: 411) + } + if let v = _storage._fieldName12 { + try visitor.visitSingularInt32Field(value: v, fieldNumber: 412) + } + if let v = _storage.__FieldName13 { + try visitor.visitSingularInt32Field(value: v, fieldNumber: 413) + } + if let v = _storage.__FieldName14 { + try visitor.visitSingularInt32Field(value: v, fieldNumber: 414) + } + if let v = _storage._field_Name15 { + try visitor.visitSingularInt32Field(value: v, fieldNumber: 415) + } + if let v = _storage._field_Name16 { + try visitor.visitSingularInt32Field(value: v, fieldNumber: 416) + } + if let v = _storage._fieldName17__ { + try visitor.visitSingularInt32Field(value: v, fieldNumber: 417) + } + if let v = _storage._fieldName18__ { + try visitor.visitSingularInt32Field(value: v, fieldNumber: 418) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + var _protobuf_extensionFieldValues = SwiftProtobuf.ExtensionFieldValueSet() + fileprivate var _storage = _StorageClass.defaultInstance +} + +struct ProtobufTestMessages_Proto2_ForeignMessage: SwiftProtobuf.Message { + static let protoMessageName: String = _protobuf_package + ".ForeignMessage" + + var c: Int32 { + get {return _c ?? 0} + set {_c = newValue} + } + /// Returns true if `c` has been explicitly set. + var hasC: Bool {return self._c != nil} + /// Clears the value of `c`. Subsequent reads from it will return its default value. + mutating func clearC() {self._c = nil} + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularInt32Field(value: &self._c) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + func traverse(visitor: inout V) throws { + if let v = self._c { + try visitor.visitSingularInt32Field(value: v, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _c: Int32? = nil +} + +// MARK: - Extension support defined in test_messages_proto2.proto. + +extension ProtobufTestMessages_Proto2_TestAllTypesProto2 { + + var ProtobufTestMessages_Proto2_extensionInt32: Int32 { + get {return getExtensionValue(ext: ProtobufTestMessages_Proto2_Extensions_extension_int32) ?? 0} + set {setExtensionValue(ext: ProtobufTestMessages_Proto2_Extensions_extension_int32, value: newValue)} + } + /// Returns true if extension `ProtobufTestMessages_Proto2_Extensions_extension_int32` + /// has been explicitly set. + var hasProtobufTestMessages_Proto2_extensionInt32: Bool { + return hasExtensionValue(ext: ProtobufTestMessages_Proto2_Extensions_extension_int32) + } + /// Clears the value of extension `ProtobufTestMessages_Proto2_Extensions_extension_int32`. + /// Subsequent reads from it will return its default value. + mutating func clearProtobufTestMessages_Proto2_extensionInt32() { + clearExtensionValue(ext: ProtobufTestMessages_Proto2_Extensions_extension_int32) + } +} + +extension ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrect { + + var ProtobufTestMessages_Proto2_TestAllTypesProto2_MessageSetCorrectExtension1_messageSetExtension: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension1 { + get {return getExtensionValue(ext: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension1.Extensions.message_set_extension) ?? ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension1()} + set {setExtensionValue(ext: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension1.Extensions.message_set_extension, value: newValue)} + } + /// Returns true if extension `ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension1.Extensions.message_set_extension` + /// has been explicitly set. + var hasProtobufTestMessages_Proto2_TestAllTypesProto2_MessageSetCorrectExtension1_messageSetExtension: Bool { + return hasExtensionValue(ext: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension1.Extensions.message_set_extension) + } + /// Clears the value of extension `ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension1.Extensions.message_set_extension`. + /// Subsequent reads from it will return its default value. + mutating func clearProtobufTestMessages_Proto2_TestAllTypesProto2_MessageSetCorrectExtension1_messageSetExtension() { + clearExtensionValue(ext: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension1.Extensions.message_set_extension) + } + + var ProtobufTestMessages_Proto2_TestAllTypesProto2_MessageSetCorrectExtension2_messageSetExtension: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension2 { + get {return getExtensionValue(ext: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension2.Extensions.message_set_extension) ?? ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension2()} + set {setExtensionValue(ext: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension2.Extensions.message_set_extension, value: newValue)} + } + /// Returns true if extension `ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension2.Extensions.message_set_extension` + /// has been explicitly set. + var hasProtobufTestMessages_Proto2_TestAllTypesProto2_MessageSetCorrectExtension2_messageSetExtension: Bool { + return hasExtensionValue(ext: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension2.Extensions.message_set_extension) + } + /// Clears the value of extension `ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension2.Extensions.message_set_extension`. + /// Subsequent reads from it will return its default value. + mutating func clearProtobufTestMessages_Proto2_TestAllTypesProto2_MessageSetCorrectExtension2_messageSetExtension() { + clearExtensionValue(ext: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension2.Extensions.message_set_extension) + } + +} + +/// A `SwiftProtobuf.SimpleExtensionMap` that includes all of the extensions defined by +/// this .proto file. It can be used any place an `SwiftProtobuf.ExtensionMap` is needed +/// in parsing, or it can be combined with other `SwiftProtobuf.SimpleExtensionMap`s to create +/// a larger `SwiftProtobuf.SimpleExtensionMap`. +let ProtobufTestMessages_Proto2_TestMessagesProto2_Extensions: SwiftProtobuf.SimpleExtensionMap = [ + ProtobufTestMessages_Proto2_Extensions_extension_int32, + ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension1.Extensions.message_set_extension, + ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension2.Extensions.message_set_extension +] + +let ProtobufTestMessages_Proto2_Extensions_extension_int32 = SwiftProtobuf.MessageExtension, ProtobufTestMessages_Proto2_TestAllTypesProto2>( + _protobuf_fieldNumber: 120, + fieldName: "protobuf_test_messages.proto2.extension_int32" +) + +extension ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension1 { + enum Extensions { + static let message_set_extension = SwiftProtobuf.MessageExtension, ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrect>( + _protobuf_fieldNumber: 1547769, + fieldName: "protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrectExtension1" + ) + } +} + +extension ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension2 { + enum Extensions { + static let message_set_extension = SwiftProtobuf.MessageExtension, ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrect>( + _protobuf_fieldNumber: 4135312, + fieldName: "protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrectExtension2" + ) + } +} + +// MARK: - Code below here is support for the SwiftProtobuf runtime. + +fileprivate let _protobuf_package = "protobuf_test_messages.proto2" + +extension ProtobufTestMessages_Proto2_ForeignEnum: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "FOREIGN_FOO"), + 1: .same(proto: "FOREIGN_BAR"), + 2: .same(proto: "FOREIGN_BAZ"), + ] +} + +extension ProtobufTestMessages_Proto2_TestAllTypesProto2: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "optional_int32"), + 2: .standard(proto: "optional_int64"), + 3: .standard(proto: "optional_uint32"), + 4: .standard(proto: "optional_uint64"), + 5: .standard(proto: "optional_sint32"), + 6: .standard(proto: "optional_sint64"), + 7: .standard(proto: "optional_fixed32"), + 8: .standard(proto: "optional_fixed64"), + 9: .standard(proto: "optional_sfixed32"), + 10: .standard(proto: "optional_sfixed64"), + 11: .standard(proto: "optional_float"), + 12: .standard(proto: "optional_double"), + 13: .standard(proto: "optional_bool"), + 14: .standard(proto: "optional_string"), + 15: .standard(proto: "optional_bytes"), + 18: .standard(proto: "optional_nested_message"), + 19: .standard(proto: "optional_foreign_message"), + 21: .standard(proto: "optional_nested_enum"), + 22: .standard(proto: "optional_foreign_enum"), + 24: .standard(proto: "optional_string_piece"), + 25: .standard(proto: "optional_cord"), + 27: .standard(proto: "recursive_message"), + 31: .standard(proto: "repeated_int32"), + 32: .standard(proto: "repeated_int64"), + 33: .standard(proto: "repeated_uint32"), + 34: .standard(proto: "repeated_uint64"), + 35: .standard(proto: "repeated_sint32"), + 36: .standard(proto: "repeated_sint64"), + 37: .standard(proto: "repeated_fixed32"), + 38: .standard(proto: "repeated_fixed64"), + 39: .standard(proto: "repeated_sfixed32"), + 40: .standard(proto: "repeated_sfixed64"), + 41: .standard(proto: "repeated_float"), + 42: .standard(proto: "repeated_double"), + 43: .standard(proto: "repeated_bool"), + 44: .standard(proto: "repeated_string"), + 45: .standard(proto: "repeated_bytes"), + 48: .standard(proto: "repeated_nested_message"), + 49: .standard(proto: "repeated_foreign_message"), + 51: .standard(proto: "repeated_nested_enum"), + 52: .standard(proto: "repeated_foreign_enum"), + 54: .standard(proto: "repeated_string_piece"), + 55: .standard(proto: "repeated_cord"), + 56: .standard(proto: "map_int32_int32"), + 57: .standard(proto: "map_int64_int64"), + 58: .standard(proto: "map_uint32_uint32"), + 59: .standard(proto: "map_uint64_uint64"), + 60: .standard(proto: "map_sint32_sint32"), + 61: .standard(proto: "map_sint64_sint64"), + 62: .standard(proto: "map_fixed32_fixed32"), + 63: .standard(proto: "map_fixed64_fixed64"), + 64: .standard(proto: "map_sfixed32_sfixed32"), + 65: .standard(proto: "map_sfixed64_sfixed64"), + 66: .standard(proto: "map_int32_float"), + 67: .standard(proto: "map_int32_double"), + 68: .standard(proto: "map_bool_bool"), + 69: .standard(proto: "map_string_string"), + 70: .standard(proto: "map_string_bytes"), + 71: .standard(proto: "map_string_nested_message"), + 72: .standard(proto: "map_string_foreign_message"), + 73: .standard(proto: "map_string_nested_enum"), + 74: .standard(proto: "map_string_foreign_enum"), + 111: .standard(proto: "oneof_uint32"), + 112: .standard(proto: "oneof_nested_message"), + 113: .standard(proto: "oneof_string"), + 114: .standard(proto: "oneof_bytes"), + 115: .standard(proto: "oneof_bool"), + 116: .standard(proto: "oneof_uint64"), + 117: .standard(proto: "oneof_float"), + 118: .standard(proto: "oneof_double"), + 119: .standard(proto: "oneof_enum"), + 201: .unique(proto: "Data", json: "data"), + 401: .same(proto: "fieldname1"), + 402: .standard(proto: "field_name2"), + 403: .standard(proto: "_field_name3"), + 404: .standard(proto: "field__name4_"), + 405: .same(proto: "field0name5"), + 406: .standard(proto: "field_0_name6"), + 407: .same(proto: "fieldName7"), + 408: .same(proto: "FieldName8"), + 409: .standard(proto: "field_Name9"), + 410: .standard(proto: "Field_Name10"), + 411: .standard(proto: "FIELD_NAME11"), + 412: .standard(proto: "FIELD_name12"), + 413: .standard(proto: "__field_name13"), + 414: .standard(proto: "__Field_name14"), + 415: .standard(proto: "field__name15"), + 416: .standard(proto: "field__Name16"), + 417: .standard(proto: "field_name17__"), + 418: .standard(proto: "Field_name18__"), + ] + + fileprivate class _StorageClass { + var _optionalInt32: Int32? = nil + var _optionalInt64: Int64? = nil + var _optionalUint32: UInt32? = nil + var _optionalUint64: UInt64? = nil + var _optionalSint32: Int32? = nil + var _optionalSint64: Int64? = nil + var _optionalFixed32: UInt32? = nil + var _optionalFixed64: UInt64? = nil + var _optionalSfixed32: Int32? = nil + var _optionalSfixed64: Int64? = nil + var _optionalFloat: Float? = nil + var _optionalDouble: Double? = nil + var _optionalBool: Bool? = nil + var _optionalString: String? = nil + var _optionalBytes: Data? = nil + var _optionalNestedMessage: ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedMessage? = nil + var _optionalForeignMessage: ProtobufTestMessages_Proto2_ForeignMessage? = nil + var _optionalNestedEnum: ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedEnum? = nil + var _optionalForeignEnum: ProtobufTestMessages_Proto2_ForeignEnum? = nil + var _optionalStringPiece: String? = nil + var _optionalCord: String? = nil + var _recursiveMessage: ProtobufTestMessages_Proto2_TestAllTypesProto2? = nil + var _repeatedInt32: [Int32] = [] + var _repeatedInt64: [Int64] = [] + var _repeatedUint32: [UInt32] = [] + var _repeatedUint64: [UInt64] = [] + var _repeatedSint32: [Int32] = [] + var _repeatedSint64: [Int64] = [] + var _repeatedFixed32: [UInt32] = [] + var _repeatedFixed64: [UInt64] = [] + var _repeatedSfixed32: [Int32] = [] + var _repeatedSfixed64: [Int64] = [] + var _repeatedFloat: [Float] = [] + var _repeatedDouble: [Double] = [] + var _repeatedBool: [Bool] = [] + var _repeatedString: [String] = [] + var _repeatedBytes: [Data] = [] + var _repeatedNestedMessage: [ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedMessage] = [] + var _repeatedForeignMessage: [ProtobufTestMessages_Proto2_ForeignMessage] = [] + var _repeatedNestedEnum: [ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedEnum] = [] + var _repeatedForeignEnum: [ProtobufTestMessages_Proto2_ForeignEnum] = [] + var _repeatedStringPiece: [String] = [] + var _repeatedCord: [String] = [] + var _mapInt32Int32: Dictionary = [:] + var _mapInt64Int64: Dictionary = [:] + var _mapUint32Uint32: Dictionary = [:] + var _mapUint64Uint64: Dictionary = [:] + var _mapSint32Sint32: Dictionary = [:] + var _mapSint64Sint64: Dictionary = [:] + var _mapFixed32Fixed32: Dictionary = [:] + var _mapFixed64Fixed64: Dictionary = [:] + var _mapSfixed32Sfixed32: Dictionary = [:] + var _mapSfixed64Sfixed64: Dictionary = [:] + var _mapInt32Float: Dictionary = [:] + var _mapInt32Double: Dictionary = [:] + var _mapBoolBool: Dictionary = [:] + var _mapStringString: Dictionary = [:] + var _mapStringBytes: Dictionary = [:] + var _mapStringNestedMessage: Dictionary = [:] + var _mapStringForeignMessage: Dictionary = [:] + var _mapStringNestedEnum: Dictionary = [:] + var _mapStringForeignEnum: Dictionary = [:] + var _oneofField: ProtobufTestMessages_Proto2_TestAllTypesProto2.OneOf_OneofField? + var _data: ProtobufTestMessages_Proto2_TestAllTypesProto2.DataMessage? = nil + var _fieldname1: Int32? = nil + var _fieldName2: Int32? = nil + var _fieldName3: Int32? = nil + var _field_Name4_: Int32? = nil + var _field0Name5: Int32? = nil + var _field0Name6: Int32? = nil + var _fieldName7: Int32? = nil + var _fieldName8: Int32? = nil + var _fieldName9: Int32? = nil + var _fieldName10: Int32? = nil + var _fieldName11: Int32? = nil + var _fieldName12: Int32? = nil + var __FieldName13: Int32? = nil + var __FieldName14: Int32? = nil + var _field_Name15: Int32? = nil + var _field_Name16: Int32? = nil + var _fieldName17__: Int32? = nil + var _fieldName18__: Int32? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _optionalInt32 = source._optionalInt32 + _optionalInt64 = source._optionalInt64 + _optionalUint32 = source._optionalUint32 + _optionalUint64 = source._optionalUint64 + _optionalSint32 = source._optionalSint32 + _optionalSint64 = source._optionalSint64 + _optionalFixed32 = source._optionalFixed32 + _optionalFixed64 = source._optionalFixed64 + _optionalSfixed32 = source._optionalSfixed32 + _optionalSfixed64 = source._optionalSfixed64 + _optionalFloat = source._optionalFloat + _optionalDouble = source._optionalDouble + _optionalBool = source._optionalBool + _optionalString = source._optionalString + _optionalBytes = source._optionalBytes + _optionalNestedMessage = source._optionalNestedMessage + _optionalForeignMessage = source._optionalForeignMessage + _optionalNestedEnum = source._optionalNestedEnum + _optionalForeignEnum = source._optionalForeignEnum + _optionalStringPiece = source._optionalStringPiece + _optionalCord = source._optionalCord + _recursiveMessage = source._recursiveMessage + _repeatedInt32 = source._repeatedInt32 + _repeatedInt64 = source._repeatedInt64 + _repeatedUint32 = source._repeatedUint32 + _repeatedUint64 = source._repeatedUint64 + _repeatedSint32 = source._repeatedSint32 + _repeatedSint64 = source._repeatedSint64 + _repeatedFixed32 = source._repeatedFixed32 + _repeatedFixed64 = source._repeatedFixed64 + _repeatedSfixed32 = source._repeatedSfixed32 + _repeatedSfixed64 = source._repeatedSfixed64 + _repeatedFloat = source._repeatedFloat + _repeatedDouble = source._repeatedDouble + _repeatedBool = source._repeatedBool + _repeatedString = source._repeatedString + _repeatedBytes = source._repeatedBytes + _repeatedNestedMessage = source._repeatedNestedMessage + _repeatedForeignMessage = source._repeatedForeignMessage + _repeatedNestedEnum = source._repeatedNestedEnum + _repeatedForeignEnum = source._repeatedForeignEnum + _repeatedStringPiece = source._repeatedStringPiece + _repeatedCord = source._repeatedCord + _mapInt32Int32 = source._mapInt32Int32 + _mapInt64Int64 = source._mapInt64Int64 + _mapUint32Uint32 = source._mapUint32Uint32 + _mapUint64Uint64 = source._mapUint64Uint64 + _mapSint32Sint32 = source._mapSint32Sint32 + _mapSint64Sint64 = source._mapSint64Sint64 + _mapFixed32Fixed32 = source._mapFixed32Fixed32 + _mapFixed64Fixed64 = source._mapFixed64Fixed64 + _mapSfixed32Sfixed32 = source._mapSfixed32Sfixed32 + _mapSfixed64Sfixed64 = source._mapSfixed64Sfixed64 + _mapInt32Float = source._mapInt32Float + _mapInt32Double = source._mapInt32Double + _mapBoolBool = source._mapBoolBool + _mapStringString = source._mapStringString + _mapStringBytes = source._mapStringBytes + _mapStringNestedMessage = source._mapStringNestedMessage + _mapStringForeignMessage = source._mapStringForeignMessage + _mapStringNestedEnum = source._mapStringNestedEnum + _mapStringForeignEnum = source._mapStringForeignEnum + _oneofField = source._oneofField + _data = source._data + _fieldname1 = source._fieldname1 + _fieldName2 = source._fieldName2 + _fieldName3 = source._fieldName3 + _field_Name4_ = source._field_Name4_ + _field0Name5 = source._field0Name5 + _field0Name6 = source._field0Name6 + _fieldName7 = source._fieldName7 + _fieldName8 = source._fieldName8 + _fieldName9 = source._fieldName9 + _fieldName10 = source._fieldName10 + _fieldName11 = source._fieldName11 + _fieldName12 = source._fieldName12 + __FieldName13 = source.__FieldName13 + __FieldName14 = source.__FieldName14 + _field_Name15 = source._field_Name15 + _field_Name16 = source._field_Name16 + _fieldName17__ = source._fieldName17__ + _fieldName18__ = source._fieldName18__ + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + func _protobuf_generated_isEqualTo(other: ProtobufTestMessages_Proto2_TestAllTypesProto2) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_args: (_StorageClass, _StorageClass)) in + let _storage = _args.0 + let other_storage = _args.1 + if _storage._optionalInt32 != other_storage._optionalInt32 {return false} + if _storage._optionalInt64 != other_storage._optionalInt64 {return false} + if _storage._optionalUint32 != other_storage._optionalUint32 {return false} + if _storage._optionalUint64 != other_storage._optionalUint64 {return false} + if _storage._optionalSint32 != other_storage._optionalSint32 {return false} + if _storage._optionalSint64 != other_storage._optionalSint64 {return false} + if _storage._optionalFixed32 != other_storage._optionalFixed32 {return false} + if _storage._optionalFixed64 != other_storage._optionalFixed64 {return false} + if _storage._optionalSfixed32 != other_storage._optionalSfixed32 {return false} + if _storage._optionalSfixed64 != other_storage._optionalSfixed64 {return false} + if _storage._optionalFloat != other_storage._optionalFloat {return false} + if _storage._optionalDouble != other_storage._optionalDouble {return false} + if _storage._optionalBool != other_storage._optionalBool {return false} + if _storage._optionalString != other_storage._optionalString {return false} + if _storage._optionalBytes != other_storage._optionalBytes {return false} + if _storage._optionalNestedMessage != other_storage._optionalNestedMessage {return false} + if _storage._optionalForeignMessage != other_storage._optionalForeignMessage {return false} + if _storage._optionalNestedEnum != other_storage._optionalNestedEnum {return false} + if _storage._optionalForeignEnum != other_storage._optionalForeignEnum {return false} + if _storage._optionalStringPiece != other_storage._optionalStringPiece {return false} + if _storage._optionalCord != other_storage._optionalCord {return false} + if _storage._recursiveMessage != other_storage._recursiveMessage {return false} + if _storage._repeatedInt32 != other_storage._repeatedInt32 {return false} + if _storage._repeatedInt64 != other_storage._repeatedInt64 {return false} + if _storage._repeatedUint32 != other_storage._repeatedUint32 {return false} + if _storage._repeatedUint64 != other_storage._repeatedUint64 {return false} + if _storage._repeatedSint32 != other_storage._repeatedSint32 {return false} + if _storage._repeatedSint64 != other_storage._repeatedSint64 {return false} + if _storage._repeatedFixed32 != other_storage._repeatedFixed32 {return false} + if _storage._repeatedFixed64 != other_storage._repeatedFixed64 {return false} + if _storage._repeatedSfixed32 != other_storage._repeatedSfixed32 {return false} + if _storage._repeatedSfixed64 != other_storage._repeatedSfixed64 {return false} + if _storage._repeatedFloat != other_storage._repeatedFloat {return false} + if _storage._repeatedDouble != other_storage._repeatedDouble {return false} + if _storage._repeatedBool != other_storage._repeatedBool {return false} + if _storage._repeatedString != other_storage._repeatedString {return false} + if _storage._repeatedBytes != other_storage._repeatedBytes {return false} + if _storage._repeatedNestedMessage != other_storage._repeatedNestedMessage {return false} + if _storage._repeatedForeignMessage != other_storage._repeatedForeignMessage {return false} + if _storage._repeatedNestedEnum != other_storage._repeatedNestedEnum {return false} + if _storage._repeatedForeignEnum != other_storage._repeatedForeignEnum {return false} + if _storage._repeatedStringPiece != other_storage._repeatedStringPiece {return false} + if _storage._repeatedCord != other_storage._repeatedCord {return false} + if _storage._mapInt32Int32 != other_storage._mapInt32Int32 {return false} + if _storage._mapInt64Int64 != other_storage._mapInt64Int64 {return false} + if _storage._mapUint32Uint32 != other_storage._mapUint32Uint32 {return false} + if _storage._mapUint64Uint64 != other_storage._mapUint64Uint64 {return false} + if _storage._mapSint32Sint32 != other_storage._mapSint32Sint32 {return false} + if _storage._mapSint64Sint64 != other_storage._mapSint64Sint64 {return false} + if _storage._mapFixed32Fixed32 != other_storage._mapFixed32Fixed32 {return false} + if _storage._mapFixed64Fixed64 != other_storage._mapFixed64Fixed64 {return false} + if _storage._mapSfixed32Sfixed32 != other_storage._mapSfixed32Sfixed32 {return false} + if _storage._mapSfixed64Sfixed64 != other_storage._mapSfixed64Sfixed64 {return false} + if _storage._mapInt32Float != other_storage._mapInt32Float {return false} + if _storage._mapInt32Double != other_storage._mapInt32Double {return false} + if _storage._mapBoolBool != other_storage._mapBoolBool {return false} + if _storage._mapStringString != other_storage._mapStringString {return false} + if _storage._mapStringBytes != other_storage._mapStringBytes {return false} + if _storage._mapStringNestedMessage != other_storage._mapStringNestedMessage {return false} + if _storage._mapStringForeignMessage != other_storage._mapStringForeignMessage {return false} + if _storage._mapStringNestedEnum != other_storage._mapStringNestedEnum {return false} + if _storage._mapStringForeignEnum != other_storage._mapStringForeignEnum {return false} + if _storage._oneofField != other_storage._oneofField {return false} + if _storage._data != other_storage._data {return false} + if _storage._fieldname1 != other_storage._fieldname1 {return false} + if _storage._fieldName2 != other_storage._fieldName2 {return false} + if _storage._fieldName3 != other_storage._fieldName3 {return false} + if _storage._field_Name4_ != other_storage._field_Name4_ {return false} + if _storage._field0Name5 != other_storage._field0Name5 {return false} + if _storage._field0Name6 != other_storage._field0Name6 {return false} + if _storage._fieldName7 != other_storage._fieldName7 {return false} + if _storage._fieldName8 != other_storage._fieldName8 {return false} + if _storage._fieldName9 != other_storage._fieldName9 {return false} + if _storage._fieldName10 != other_storage._fieldName10 {return false} + if _storage._fieldName11 != other_storage._fieldName11 {return false} + if _storage._fieldName12 != other_storage._fieldName12 {return false} + if _storage.__FieldName13 != other_storage.__FieldName13 {return false} + if _storage.__FieldName14 != other_storage.__FieldName14 {return false} + if _storage._field_Name15 != other_storage._field_Name15 {return false} + if _storage._field_Name16 != other_storage._field_Name16 {return false} + if _storage._fieldName17__ != other_storage._fieldName17__ {return false} + if _storage._fieldName18__ != other_storage._fieldName18__ {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + if _protobuf_extensionFieldValues != other._protobuf_extensionFieldValues {return false} + return true + } +} + +extension ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedEnum: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + -1: .same(proto: "NEG"), + 0: .same(proto: "FOO"), + 1: .same(proto: "BAR"), + 2: .same(proto: "BAZ"), + ] +} + +extension ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedMessage: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "a"), + 2: .same(proto: "corecursive"), + ] + + fileprivate class _StorageClass { + var _a: Int32? = nil + var _corecursive: ProtobufTestMessages_Proto2_TestAllTypesProto2? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _a = source._a + _corecursive = source._corecursive + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + func _protobuf_generated_isEqualTo(other: ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedMessage) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_args: (_StorageClass, _StorageClass)) in + let _storage = _args.0 + let other_storage = _args.1 + if _storage._a != other_storage._a {return false} + if _storage._corecursive != other_storage._corecursive {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension ProtobufTestMessages_Proto2_TestAllTypesProto2.DataMessage: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 202: .standard(proto: "group_int32"), + 203: .standard(proto: "group_uint32"), + ] + + func _protobuf_generated_isEqualTo(other: ProtobufTestMessages_Proto2_TestAllTypesProto2.DataMessage) -> Bool { + if self._groupInt32 != other._groupInt32 {return false} + if self._groupUint32 != other._groupUint32 {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrect: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap = SwiftProtobuf._NameMap() + + func _protobuf_generated_isEqualTo(other: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrect) -> Bool { + if unknownFields != other.unknownFields {return false} + if _protobuf_extensionFieldValues != other._protobuf_extensionFieldValues {return false} + return true + } +} + +extension ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension1: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 25: .same(proto: "str"), + ] + + func _protobuf_generated_isEqualTo(other: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension1) -> Bool { + if self._str != other._str {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension2: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 9: .same(proto: "i"), + ] + + func _protobuf_generated_isEqualTo(other: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension2) -> Bool { + if self._i != other._i {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension ProtobufTestMessages_Proto2_ForeignMessage: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "c"), + ] + + func _protobuf_generated_isEqualTo(other: ProtobufTestMessages_Proto2_ForeignMessage) -> Bool { + if self._c != other._c {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} diff --git a/Sources/Conformance/test_messages_proto3.pb.swift b/Sources/Conformance/test_messages_proto3.pb.swift index 7e72bd24e..71b6446cf 100644 --- a/Sources/Conformance/test_messages_proto3.pb.swift +++ b/Sources/Conformance/test_messages_proto3.pb.swift @@ -93,8 +93,8 @@ enum ProtobufTestMessages_Proto3_ForeignEnum: SwiftProtobuf.Enum { /// 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. -struct ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf.Message { - static let protoMessageName: String = _protobuf_package + ".TestAllTypes" +struct ProtobufTestMessages_Proto3_TestAllTypesProto3: SwiftProtobuf.Message { + static let protoMessageName: String = _protobuf_package + ".TestAllTypesProto3" /// Singular var optionalInt32: Int32 { @@ -172,8 +172,8 @@ struct ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf.Message { set {_uniqueStorage()._optionalBytes = newValue} } - var optionalNestedMessage: ProtobufTestMessages_Proto3_TestAllTypes.NestedMessage { - get {return _storage._optionalNestedMessage ?? ProtobufTestMessages_Proto3_TestAllTypes.NestedMessage()} + var optionalNestedMessage: ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedMessage { + get {return _storage._optionalNestedMessage ?? ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedMessage()} set {_uniqueStorage()._optionalNestedMessage = newValue} } /// Returns true if `optionalNestedMessage` has been explicitly set. @@ -190,7 +190,7 @@ struct ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf.Message { /// Clears the value of `optionalForeignMessage`. Subsequent reads from it will return its default value. mutating func clearOptionalForeignMessage() {_storage._optionalForeignMessage = nil} - var optionalNestedEnum: ProtobufTestMessages_Proto3_TestAllTypes.NestedEnum { + var optionalNestedEnum: ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedEnum { get {return _storage._optionalNestedEnum} set {_uniqueStorage()._optionalNestedEnum = newValue} } @@ -210,8 +210,8 @@ struct ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf.Message { set {_uniqueStorage()._optionalCord = newValue} } - var recursiveMessage: ProtobufTestMessages_Proto3_TestAllTypes { - get {return _storage._recursiveMessage ?? ProtobufTestMessages_Proto3_TestAllTypes()} + var recursiveMessage: ProtobufTestMessages_Proto3_TestAllTypesProto3 { + get {return _storage._recursiveMessage ?? ProtobufTestMessages_Proto3_TestAllTypesProto3()} set {_uniqueStorage()._recursiveMessage = newValue} } /// Returns true if `recursiveMessage` has been explicitly set. @@ -295,7 +295,7 @@ struct ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf.Message { set {_uniqueStorage()._repeatedBytes = newValue} } - var repeatedNestedMessage: [ProtobufTestMessages_Proto3_TestAllTypes.NestedMessage] { + var repeatedNestedMessage: [ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedMessage] { get {return _storage._repeatedNestedMessage} set {_uniqueStorage()._repeatedNestedMessage = newValue} } @@ -305,7 +305,7 @@ struct ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf.Message { set {_uniqueStorage()._repeatedForeignMessage = newValue} } - var repeatedNestedEnum: [ProtobufTestMessages_Proto3_TestAllTypes.NestedEnum] { + var repeatedNestedEnum: [ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedEnum] { get {return _storage._repeatedNestedEnum} set {_uniqueStorage()._repeatedNestedEnum = newValue} } @@ -401,7 +401,7 @@ struct ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf.Message { set {_uniqueStorage()._mapStringBytes = newValue} } - var mapStringNestedMessage: Dictionary { + var mapStringNestedMessage: Dictionary { get {return _storage._mapStringNestedMessage} set {_uniqueStorage()._mapStringNestedMessage = newValue} } @@ -411,7 +411,7 @@ struct ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf.Message { set {_uniqueStorage()._mapStringForeignMessage = newValue} } - var mapStringNestedEnum: Dictionary { + var mapStringNestedEnum: Dictionary { get {return _storage._mapStringNestedEnum} set {_uniqueStorage()._mapStringNestedEnum = newValue} } @@ -434,10 +434,10 @@ struct ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf.Message { set {_uniqueStorage()._oneofField = .oneofUint32(newValue)} } - var oneofNestedMessage: ProtobufTestMessages_Proto3_TestAllTypes.NestedMessage { + var oneofNestedMessage: ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedMessage { get { if case .oneofNestedMessage(let v)? = _storage._oneofField {return v} - return ProtobufTestMessages_Proto3_TestAllTypes.NestedMessage() + return ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedMessage() } set {_uniqueStorage()._oneofField = .oneofNestedMessage(newValue)} } @@ -490,7 +490,7 @@ struct ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf.Message { set {_uniqueStorage()._oneofField = .oneofDouble(newValue)} } - var oneofEnum: ProtobufTestMessages_Proto3_TestAllTypes.NestedEnum { + var oneofEnum: ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedEnum { get { if case .oneofEnum(let v)? = _storage._oneofField {return v} return .foo @@ -805,16 +805,16 @@ struct ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf.Message { enum OneOf_OneofField: Equatable { case oneofUint32(UInt32) - case oneofNestedMessage(ProtobufTestMessages_Proto3_TestAllTypes.NestedMessage) + case oneofNestedMessage(ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedMessage) case oneofString(String) case oneofBytes(Data) case oneofBool(Bool) case oneofUint64(UInt64) case oneofFloat(Float) case oneofDouble(Double) - case oneofEnum(ProtobufTestMessages_Proto3_TestAllTypes.NestedEnum) + case oneofEnum(ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedEnum) - static func ==(lhs: ProtobufTestMessages_Proto3_TestAllTypes.OneOf_OneofField, rhs: ProtobufTestMessages_Proto3_TestAllTypes.OneOf_OneofField) -> Bool { + static func ==(lhs: ProtobufTestMessages_Proto3_TestAllTypesProto3.OneOf_OneofField, rhs: ProtobufTestMessages_Proto3_TestAllTypesProto3.OneOf_OneofField) -> Bool { switch (lhs, rhs) { case (.oneofUint32(let l), .oneofUint32(let r)): return l == r case (.oneofNestedMessage(let l), .oneofNestedMessage(let r)): return l == r @@ -867,15 +867,15 @@ struct ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf.Message { } struct NestedMessage: SwiftProtobuf.Message { - static let protoMessageName: String = ProtobufTestMessages_Proto3_TestAllTypes.protoMessageName + ".NestedMessage" + static let protoMessageName: String = ProtobufTestMessages_Proto3_TestAllTypesProto3.protoMessageName + ".NestedMessage" var a: Int32 { get {return _storage._a} set {_uniqueStorage()._a = newValue} } - var corecursive: ProtobufTestMessages_Proto3_TestAllTypes { - get {return _storage._corecursive ?? ProtobufTestMessages_Proto3_TestAllTypes()} + var corecursive: ProtobufTestMessages_Proto3_TestAllTypesProto3 { + get {return _storage._corecursive ?? ProtobufTestMessages_Proto3_TestAllTypesProto3()} set {_uniqueStorage()._corecursive = newValue} } /// Returns true if `corecursive` has been explicitly set. @@ -992,9 +992,9 @@ struct ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf.Message { case 68: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: &_storage._mapBoolBool) case 69: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: &_storage._mapStringString) case 70: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: &_storage._mapStringBytes) - case 71: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: &_storage._mapStringNestedMessage) + case 71: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: &_storage._mapStringNestedMessage) case 72: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: &_storage._mapStringForeignMessage) - case 73: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufEnumMap.self, value: &_storage._mapStringNestedEnum) + case 73: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufEnumMap.self, value: &_storage._mapStringNestedEnum) case 74: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufEnumMap.self, value: &_storage._mapStringForeignEnum) case 111: if _storage._oneofField != nil {try decoder.handleConflictingOneOf()} @@ -1002,7 +1002,7 @@ struct ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf.Message { try decoder.decodeSingularUInt32Field(value: &v) if let v = v {_storage._oneofField = .oneofUint32(v)} case 112: - var v: ProtobufTestMessages_Proto3_TestAllTypes.NestedMessage? + var v: ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedMessage? if let current = _storage._oneofField { try decoder.handleConflictingOneOf() if case .oneofNestedMessage(let m) = current {v = m} @@ -1041,7 +1041,7 @@ struct ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf.Message { if let v = v {_storage._oneofField = .oneofDouble(v)} case 119: if _storage._oneofField != nil {try decoder.handleConflictingOneOf()} - var v: ProtobufTestMessages_Proto3_TestAllTypes.NestedEnum? + var v: ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedEnum? try decoder.decodeSingularEnumField(value: &v) if let v = v {_storage._oneofField = .oneofEnum(v)} case 201: try decoder.decodeSingularMessageField(value: &_storage._optionalBoolWrapper) @@ -1279,13 +1279,13 @@ struct ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf.Message { try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: _storage._mapStringBytes, fieldNumber: 70) } if !_storage._mapStringNestedMessage.isEmpty { - try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: _storage._mapStringNestedMessage, fieldNumber: 71) + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: _storage._mapStringNestedMessage, fieldNumber: 71) } if !_storage._mapStringForeignMessage.isEmpty { try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: _storage._mapStringForeignMessage, fieldNumber: 72) } if !_storage._mapStringNestedEnum.isEmpty { - try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufEnumMap.self, value: _storage._mapStringNestedEnum, fieldNumber: 73) + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufEnumMap.self, value: _storage._mapStringNestedEnum, fieldNumber: 73) } if !_storage._mapStringForeignEnum.isEmpty { try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufEnumMap.self, value: _storage._mapStringForeignEnum, fieldNumber: 74) @@ -1508,7 +1508,7 @@ extension ProtobufTestMessages_Proto3_ForeignEnum: SwiftProtobuf._ProtoNameProvi ] } -extension ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { +extension ProtobufTestMessages_Proto3_TestAllTypesProto3: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "optional_int32"), 2: .standard(proto: "optional_int64"), @@ -1647,13 +1647,13 @@ extension ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf._MessageImplem var _optionalBool: Bool = false var _optionalString: String = String() var _optionalBytes: Data = SwiftProtobuf.Internal.emptyData - var _optionalNestedMessage: ProtobufTestMessages_Proto3_TestAllTypes.NestedMessage? = nil + var _optionalNestedMessage: ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedMessage? = nil var _optionalForeignMessage: ProtobufTestMessages_Proto3_ForeignMessage? = nil - var _optionalNestedEnum: ProtobufTestMessages_Proto3_TestAllTypes.NestedEnum = .foo + var _optionalNestedEnum: ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedEnum = .foo var _optionalForeignEnum: ProtobufTestMessages_Proto3_ForeignEnum = .foreignFoo var _optionalStringPiece: String = String() var _optionalCord: String = String() - var _recursiveMessage: ProtobufTestMessages_Proto3_TestAllTypes? = nil + var _recursiveMessage: ProtobufTestMessages_Proto3_TestAllTypesProto3? = nil var _repeatedInt32: [Int32] = [] var _repeatedInt64: [Int64] = [] var _repeatedUint32: [UInt32] = [] @@ -1669,9 +1669,9 @@ extension ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf._MessageImplem var _repeatedBool: [Bool] = [] var _repeatedString: [String] = [] var _repeatedBytes: [Data] = [] - var _repeatedNestedMessage: [ProtobufTestMessages_Proto3_TestAllTypes.NestedMessage] = [] + var _repeatedNestedMessage: [ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedMessage] = [] var _repeatedForeignMessage: [ProtobufTestMessages_Proto3_ForeignMessage] = [] - var _repeatedNestedEnum: [ProtobufTestMessages_Proto3_TestAllTypes.NestedEnum] = [] + var _repeatedNestedEnum: [ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedEnum] = [] var _repeatedForeignEnum: [ProtobufTestMessages_Proto3_ForeignEnum] = [] var _repeatedStringPiece: [String] = [] var _repeatedCord: [String] = [] @@ -1690,11 +1690,11 @@ extension ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf._MessageImplem var _mapBoolBool: Dictionary = [:] var _mapStringString: Dictionary = [:] var _mapStringBytes: Dictionary = [:] - var _mapStringNestedMessage: Dictionary = [:] + var _mapStringNestedMessage: Dictionary = [:] var _mapStringForeignMessage: Dictionary = [:] - var _mapStringNestedEnum: Dictionary = [:] + var _mapStringNestedEnum: Dictionary = [:] var _mapStringForeignEnum: Dictionary = [:] - var _oneofField: ProtobufTestMessages_Proto3_TestAllTypes.OneOf_OneofField? + var _oneofField: ProtobufTestMessages_Proto3_TestAllTypesProto3.OneOf_OneofField? var _optionalBoolWrapper: SwiftProtobuf.Google_Protobuf_BoolValue? = nil var _optionalInt32Wrapper: SwiftProtobuf.Google_Protobuf_Int32Value? = nil var _optionalInt64Wrapper: SwiftProtobuf.Google_Protobuf_Int64Value? = nil @@ -1870,7 +1870,7 @@ extension ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf._MessageImplem return _storage } - func _protobuf_generated_isEqualTo(other: ProtobufTestMessages_Proto3_TestAllTypes) -> Bool { + func _protobuf_generated_isEqualTo(other: ProtobufTestMessages_Proto3_TestAllTypesProto3) -> Bool { if _storage !== other._storage { let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_args: (_StorageClass, _StorageClass)) in let _storage = _args.0 @@ -1995,7 +1995,7 @@ extension ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf._MessageImplem } } -extension ProtobufTestMessages_Proto3_TestAllTypes.NestedEnum: SwiftProtobuf._ProtoNameProviding { +extension ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedEnum: SwiftProtobuf._ProtoNameProviding { static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ -1: .same(proto: "NEG"), 0: .same(proto: "FOO"), @@ -2004,7 +2004,7 @@ extension ProtobufTestMessages_Proto3_TestAllTypes.NestedEnum: SwiftProtobuf._Pr ] } -extension ProtobufTestMessages_Proto3_TestAllTypes.NestedMessage: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { +extension ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedMessage: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "a"), 2: .same(proto: "corecursive"), @@ -2012,7 +2012,7 @@ extension ProtobufTestMessages_Proto3_TestAllTypes.NestedMessage: SwiftProtobuf. fileprivate class _StorageClass { var _a: Int32 = 0 - var _corecursive: ProtobufTestMessages_Proto3_TestAllTypes? = nil + var _corecursive: ProtobufTestMessages_Proto3_TestAllTypesProto3? = nil static let defaultInstance = _StorageClass() @@ -2031,7 +2031,7 @@ extension ProtobufTestMessages_Proto3_TestAllTypes.NestedMessage: SwiftProtobuf. return _storage } - func _protobuf_generated_isEqualTo(other: ProtobufTestMessages_Proto3_TestAllTypes.NestedMessage) -> Bool { + func _protobuf_generated_isEqualTo(other: ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedMessage) -> Bool { if _storage !== other._storage { let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_args: (_StorageClass, _StorageClass)) in let _storage = _args.0 diff --git a/Sources/PluginLibrary/descriptor.pb.swift b/Sources/PluginLibrary/descriptor.pb.swift index 16ce21454..09e5b40bc 100644 --- a/Sources/PluginLibrary/descriptor.pb.swift +++ b/Sources/PluginLibrary/descriptor.pb.swift @@ -1437,6 +1437,15 @@ public struct Google_Protobuf_FileOptions: SwiftProtobuf.Message, SwiftProtobuf. /// Clears the value of `pyGenericServices`. Subsequent reads from it will return its default value. public mutating func clearPyGenericServices() {_storage._pyGenericServices = nil} + public var phpGenericServices: Bool { + get {return _storage._phpGenericServices ?? false} + set {_uniqueStorage()._phpGenericServices = newValue} + } + /// Returns true if `phpGenericServices` has been explicitly set. + public var hasPhpGenericServices: Bool {return _storage._phpGenericServices != nil} + /// Clears the value of `phpGenericServices`. Subsequent reads from it will return its default value. + public mutating func clearPhpGenericServices() {_storage._phpGenericServices = nil} + /// 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 @@ -1589,6 +1598,7 @@ public struct Google_Protobuf_FileOptions: SwiftProtobuf.Message, SwiftProtobuf. case 16: try decoder.decodeSingularBoolField(value: &_storage._ccGenericServices) case 17: try decoder.decodeSingularBoolField(value: &_storage._javaGenericServices) case 18: try decoder.decodeSingularBoolField(value: &_storage._pyGenericServices) + case 19: try decoder.decodeSingularBoolField(value: &_storage._phpGenericServices) case 20: try decoder.decodeSingularBoolField(value: &_storage._javaGenerateEqualsAndHash) case 23: try decoder.decodeSingularBoolField(value: &_storage._deprecated) case 27: try decoder.decodeSingularBoolField(value: &_storage._javaStringCheckUtf8) @@ -1637,6 +1647,9 @@ public struct Google_Protobuf_FileOptions: SwiftProtobuf.Message, SwiftProtobuf. if let v = _storage._pyGenericServices { try visitor.visitSingularBoolField(value: v, fieldNumber: 18) } + if let v = _storage._phpGenericServices { + try visitor.visitSingularBoolField(value: v, fieldNumber: 19) + } if let v = _storage._javaGenerateEqualsAndHash { try visitor.visitSingularBoolField(value: v, fieldNumber: 20) } @@ -3555,6 +3568,7 @@ extension Google_Protobuf_FileOptions: SwiftProtobuf._MessageImplementationBase, 16: .standard(proto: "cc_generic_services"), 17: .standard(proto: "java_generic_services"), 18: .standard(proto: "py_generic_services"), + 19: .standard(proto: "php_generic_services"), 23: .same(proto: "deprecated"), 31: .standard(proto: "cc_enable_arenas"), 36: .standard(proto: "objc_class_prefix"), @@ -3576,6 +3590,7 @@ extension Google_Protobuf_FileOptions: SwiftProtobuf._MessageImplementationBase, var _ccGenericServices: Bool? = nil var _javaGenericServices: Bool? = nil var _pyGenericServices: Bool? = nil + var _phpGenericServices: Bool? = nil var _deprecated: Bool? = nil var _ccEnableArenas: Bool? = nil var _objcClassPrefix: String? = nil @@ -3600,6 +3615,7 @@ extension Google_Protobuf_FileOptions: SwiftProtobuf._MessageImplementationBase, _ccGenericServices = source._ccGenericServices _javaGenericServices = source._javaGenericServices _pyGenericServices = source._pyGenericServices + _phpGenericServices = source._phpGenericServices _deprecated = source._deprecated _ccEnableArenas = source._ccEnableArenas _objcClassPrefix = source._objcClassPrefix @@ -3633,6 +3649,7 @@ extension Google_Protobuf_FileOptions: SwiftProtobuf._MessageImplementationBase, if _storage._ccGenericServices != other_storage._ccGenericServices {return false} if _storage._javaGenericServices != other_storage._javaGenericServices {return false} if _storage._pyGenericServices != other_storage._pyGenericServices {return false} + if _storage._phpGenericServices != other_storage._phpGenericServices {return false} if _storage._deprecated != other_storage._deprecated {return false} if _storage._ccEnableArenas != other_storage._ccEnableArenas {return false} if _storage._objcClassPrefix != other_storage._objcClassPrefix {return false} diff --git a/Tests/PluginLibraryTests/DescriptorTestData.swift b/Tests/PluginLibraryTests/DescriptorTestData.swift index 7b4d8f559..169c5b3d8 100644 --- a/Tests/PluginLibraryTests/DescriptorTestData.swift +++ b/Tests/PluginLibraryTests/DescriptorTestData.swift @@ -1,7 +1,7 @@ // See Makefile how this is generated. import Foundation let fileDesciptorSetBytes: [UInt8] = [ - 0x0a, 0x85, 0x37, 0x0a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x0a, 0xbe, 0x37, 0x0a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, @@ -263,7 +263,7 @@ let fileDesciptorSetBytes: [UInt8] = [ 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x22, - 0x80, 0x08, 0x0a, 0x0b, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, + 0xb9, 0x08, 0x0a, 0x0b, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6a, 0x61, 0x76, 0x61, 0x50, 0x61, 0x63, 0x6b, 0x61, @@ -310,131 +310,120 @@ let fileDesciptorSetBytes: [UInt8] = [ 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x11, 0x70, 0x79, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, - 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x17, 0x20, 0x01, - 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, - 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2f, 0x0a, - 0x10, 0x63, 0x63, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, - 0x72, 0x65, 0x6e, 0x61, 0x73, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x08, 0x3a, - 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0e, 0x63, 0x63, 0x45, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x73, 0x12, 0x2a, - 0x0a, 0x11, 0x6f, 0x62, 0x6a, 0x63, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, - 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x24, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0f, 0x6f, 0x62, 0x6a, 0x63, 0x43, 0x6c, 0x61, 0x73, 0x73, - 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x73, - 0x68, 0x61, 0x72, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x18, 0x25, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x73, - 0x68, 0x61, 0x72, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x77, 0x69, 0x66, 0x74, 0x5f, 0x70, - 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x27, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x73, 0x77, 0x69, 0x66, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, - 0x12, 0x28, 0x0a, 0x10, 0x70, 0x68, 0x70, 0x5f, 0x63, 0x6c, 0x61, 0x73, - 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x28, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0e, 0x70, 0x68, 0x70, 0x43, 0x6c, 0x61, 0x73, 0x73, - 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x68, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x37, 0x0a, 0x14, 0x70, 0x68, + 0x70, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x13, 0x20, 0x01, 0x28, 0x08, + 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x12, 0x70, 0x68, 0x70, + 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, + 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x17, 0x20, 0x01, 0x28, 0x08, 0x3a, + 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, + 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2f, 0x0a, 0x10, 0x63, 0x63, + 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x72, 0x65, 0x6e, + 0x61, 0x73, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, + 0x6c, 0x73, 0x65, 0x52, 0x0e, 0x63, 0x63, 0x45, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x6f, + 0x62, 0x6a, 0x63, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x70, 0x72, + 0x65, 0x66, 0x69, 0x78, 0x18, 0x24, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, + 0x6f, 0x62, 0x6a, 0x63, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x50, 0x72, 0x65, + 0x66, 0x69, 0x78, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x73, 0x68, 0x61, 0x72, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, - 0x29, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x68, 0x70, 0x4e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x14, 0x75, - 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, - 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, + 0x25, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x73, 0x68, 0x61, 0x72, + 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x21, + 0x0a, 0x0c, 0x73, 0x77, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, + 0x69, 0x78, 0x18, 0x27, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x77, + 0x69, 0x66, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x28, 0x0a, + 0x10, 0x70, 0x68, 0x70, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x70, + 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x28, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0e, 0x70, 0x68, 0x70, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x50, 0x72, 0x65, + 0x66, 0x69, 0x78, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x68, 0x70, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x29, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0c, 0x70, 0x68, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x22, 0x3a, 0x0a, 0x0c, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, - 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x50, 0x45, - 0x45, 0x44, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x4f, 0x44, 0x45, - 0x5f, 0x53, 0x49, 0x5a, 0x45, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x4c, - 0x49, 0x54, 0x45, 0x5f, 0x52, 0x55, 0x4e, 0x54, 0x49, 0x4d, 0x45, 0x10, - 0x03, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, - 0x4a, 0x04, 0x08, 0x26, 0x10, 0x27, 0x22, 0xd1, 0x02, 0x0a, 0x0e, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x12, 0x3c, 0x0a, 0x17, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x77, 0x69, 0x72, 0x65, 0x5f, 0x66, 0x6f, - 0x72, 0x6d, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, - 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x14, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x53, 0x65, 0x74, 0x57, 0x69, 0x72, 0x65, 0x46, 0x6f, 0x72, - 0x6d, 0x61, 0x74, 0x12, 0x4c, 0x0a, 0x1f, 0x6e, 0x6f, 0x5f, 0x73, 0x74, - 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, - 0x6c, 0x73, 0x65, 0x52, 0x1c, 0x6e, 0x6f, 0x53, 0x74, 0x61, 0x6e, 0x64, - 0x61, 0x72, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, - 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x12, 0x25, 0x0a, - 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, - 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, - 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x70, 0x5f, 0x65, 0x6e, 0x74, 0x72, - 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6d, 0x61, 0x70, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, + 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, + 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, + 0x0a, 0x0c, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x4d, 0x6f, + 0x64, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x50, 0x45, 0x45, 0x44, 0x10, + 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x49, + 0x5a, 0x45, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x4c, 0x49, 0x54, 0x45, + 0x5f, 0x52, 0x55, 0x4e, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x03, 0x2a, 0x09, + 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, + 0x26, 0x10, 0x27, 0x22, 0xd1, 0x02, 0x0a, 0x0e, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3c, + 0x0a, 0x17, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x65, + 0x74, 0x5f, 0x77, 0x69, 0x72, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, + 0x73, 0x65, 0x52, 0x14, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, + 0x65, 0x74, 0x57, 0x69, 0x72, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, + 0x12, 0x4c, 0x0a, 0x1f, 0x6e, 0x6f, 0x5f, 0x73, 0x74, 0x61, 0x6e, 0x64, + 0x61, 0x72, 0x64, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x6f, 0x72, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, + 0x52, 0x1c, 0x6e, 0x6f, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, + 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x41, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, + 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, + 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x1b, 0x0a, + 0x09, 0x6d, 0x61, 0x70, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6d, 0x61, 0x70, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, + 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, + 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, + 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x08, 0x10, + 0x09, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x22, 0xe2, 0x03, 0x0a, 0x0c, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0x41, 0x0a, 0x05, 0x63, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, + 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x43, + 0x54, 0x79, 0x70, 0x65, 0x3a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, + 0x52, 0x05, 0x63, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, + 0x61, 0x63, 0x6b, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x06, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x12, 0x47, 0x0a, 0x06, 0x6a, + 0x73, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4a, 0x53, 0x54, 0x79, 0x70, + 0x65, 0x3a, 0x09, 0x4a, 0x53, 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, + 0x52, 0x06, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x04, + 0x6c, 0x61, 0x7a, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, + 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x04, 0x6c, 0x61, 0x7a, 0x79, 0x12, + 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, + 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, + 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, + 0x65, 0x64, 0x12, 0x19, 0x0a, 0x04, 0x77, 0x65, 0x61, 0x6b, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, + 0x04, 0x77, 0x65, 0x61, 0x6b, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, - 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, - 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, - 0x08, 0x08, 0x10, 0x09, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x22, 0xe2, - 0x03, 0x0a, 0x0c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x41, 0x0a, 0x05, 0x63, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x43, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x06, 0x53, 0x54, 0x52, - 0x49, 0x4e, 0x47, 0x52, 0x05, 0x63, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, - 0x0a, 0x06, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x06, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x12, 0x47, - 0x0a, 0x06, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, - 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4a, 0x53, - 0x54, 0x79, 0x70, 0x65, 0x3a, 0x09, 0x4a, 0x53, 0x5f, 0x4e, 0x4f, 0x52, - 0x4d, 0x41, 0x4c, 0x52, 0x06, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, 0x12, - 0x19, 0x0a, 0x04, 0x6c, 0x61, 0x7a, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x04, 0x6c, 0x61, - 0x7a, 0x79, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, - 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, - 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, - 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x04, 0x77, 0x65, 0x61, - 0x6b, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, - 0x73, 0x65, 0x52, 0x04, 0x77, 0x65, 0x61, 0x6b, 0x12, 0x58, 0x0a, 0x14, - 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, - 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x22, 0x2f, 0x0a, 0x05, 0x43, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x00, 0x12, - 0x08, 0x0a, 0x04, 0x43, 0x4f, 0x52, 0x44, 0x10, 0x01, 0x12, 0x10, 0x0a, - 0x0c, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x50, 0x49, 0x45, 0x43, - 0x45, 0x10, 0x02, 0x22, 0x35, 0x0a, 0x06, 0x4a, 0x53, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x53, 0x5f, 0x4e, 0x4f, 0x52, 0x4d, - 0x41, 0x4c, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x53, 0x5f, 0x53, - 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x4a, - 0x53, 0x5f, 0x4e, 0x55, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x02, 0x2a, 0x09, - 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, - 0x04, 0x10, 0x05, 0x22, 0x73, 0x0a, 0x0c, 0x4f, 0x6e, 0x65, 0x6f, 0x66, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, - 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, - 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, - 0x22, 0xc0, 0x01, 0x0a, 0x0b, 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x6c, 0x6c, 0x6f, - 0x77, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x41, 0x6c, 0x69, 0x61, - 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, - 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, - 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, - 0x61, 0x74, 0x65, 0x64, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, + 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, + 0x2f, 0x0a, 0x05, 0x43, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, + 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, + 0x43, 0x4f, 0x52, 0x44, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x54, + 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x50, 0x49, 0x45, 0x43, 0x45, 0x10, 0x02, + 0x22, 0x35, 0x0a, 0x06, 0x4a, 0x53, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0d, + 0x0a, 0x09, 0x4a, 0x53, 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x10, + 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x53, 0x5f, 0x53, 0x54, 0x52, 0x49, + 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x53, 0x5f, 0x4e, + 0x55, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x02, 0x2a, 0x09, 0x08, 0xe8, 0x07, + 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, + 0x22, 0x73, 0x0a, 0x0c, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, @@ -442,11 +431,40 @@ let fileDesciptorSetBytes: [UInt8] = [ 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, - 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, - 0x05, 0x10, 0x06, 0x22, 0x9e, 0x01, 0x0a, 0x10, 0x45, 0x6e, 0x75, 0x6d, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0xc0, 0x01, + 0x0a, 0x0b, 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x61, + 0x6c, 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, + 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x25, + 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, + 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, + 0x64, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, + 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, + 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, + 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, + 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, + 0x22, 0x9e, 0x01, 0x0a, 0x10, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, + 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, + 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, + 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, + 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, + 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, + 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, + 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0x9c, 0x01, 0x0a, 0x0e, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, - 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, + 0x65, 0x64, 0x18, 0x21, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, @@ -456,347 +474,334 @@ let fileDesciptorSetBytes: [UInt8] = [ 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, - 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0x9c, 0x01, 0x0a, - 0x0e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, - 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x21, 0x20, 0x01, 0x28, 0x08, 0x3a, - 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, - 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, - 0xe0, 0x02, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, - 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x21, 0x20, 0x01, 0x28, - 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, - 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x71, 0x0a, 0x11, - 0x69, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x5f, - 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x49, 0x64, 0x65, 0x6d, + 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0xe0, 0x02, 0x0a, + 0x0d, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, + 0x61, 0x74, 0x65, 0x64, 0x18, 0x21, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, + 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, + 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x71, 0x0a, 0x11, 0x69, 0x64, 0x65, + 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x6c, 0x65, 0x76, + 0x65, 0x6c, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x49, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, + 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x3a, 0x13, 0x49, + 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, 0x4e, 0x43, 0x59, 0x5f, 0x55, + 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x52, 0x10, 0x69, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, - 0x3a, 0x13, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, 0x4e, 0x43, - 0x59, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x52, 0x10, 0x69, - 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x65, - 0x76, 0x65, 0x6c, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, - 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x50, 0x0a, - 0x10, 0x49, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, - 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x17, 0x0a, 0x13, 0x49, 0x44, 0x45, - 0x4d, 0x50, 0x4f, 0x54, 0x45, 0x4e, 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x4b, - 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x4e, 0x4f, - 0x5f, 0x53, 0x49, 0x44, 0x45, 0x5f, 0x45, 0x46, 0x46, 0x45, 0x43, 0x54, - 0x53, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x44, 0x45, 0x4d, 0x50, - 0x4f, 0x54, 0x45, 0x4e, 0x54, 0x10, 0x02, 0x2a, 0x09, 0x08, 0xe8, 0x07, - 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0x9a, 0x03, 0x0a, 0x13, 0x55, + 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, + 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, + 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, - 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4e, - 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x29, 0x0a, 0x10, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, - 0x69, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, - 0x69, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2c, 0x0a, 0x12, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x69, 0x6e, 0x74, - 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x10, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, - 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x6e, 0x65, - 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x5f, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, - 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x74, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62, - 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x01, 0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, - 0x61, 0x74, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, - 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x4a, 0x0a, 0x08, 0x4e, - 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6e, - 0x61, 0x6d, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x02, - 0x28, 0x09, 0x52, 0x08, 0x6e, 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, - 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x02, 0x28, 0x08, 0x52, 0x0b, - 0x69, 0x73, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, - 0xa7, 0x02, 0x0a, 0x0e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, - 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x44, 0x0a, 0x08, 0x6c, 0x6f, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x4c, 0x6f, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xce, 0x01, 0x0a, 0x08, 0x4c, 0x6f, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x04, 0x70, 0x61, 0x74, - 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, - 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x04, 0x73, 0x70, 0x61, - 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, - 0x04, 0x73, 0x70, 0x61, 0x6e, 0x12, 0x29, 0x0a, 0x10, 0x6c, 0x65, 0x61, - 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, - 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6c, 0x65, 0x61, - 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, - 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, - 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x10, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, - 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x3a, 0x0a, - 0x19, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x74, - 0x61, 0x63, 0x68, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, - 0x74, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x17, 0x6c, 0x65, - 0x61, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x74, 0x61, 0x63, 0x68, 0x65, - 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xd1, 0x01, - 0x0a, 0x11, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x43, - 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x4d, 0x0a, 0x0a, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x47, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, - 0x6e, 0x66, 0x6f, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x0a, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x1a, 0x6d, 0x0a, 0x0a, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, - 0x70, 0x61, 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x46, 0x69, 0x6c, - 0x65, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x12, - 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x03, 0x65, 0x6e, 0x64, 0x42, 0x8c, 0x01, 0x0a, 0x13, 0x63, 0x6f, - 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x42, 0x10, 0x44, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x48, - 0x01, 0x5a, 0x3e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x67, 0x6f, 0x2f, 0x64, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x3b, 0x64, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x6f, 0x72, 0xa2, 0x02, 0x03, 0x47, 0x50, 0x42, 0xaa, - 0x02, 0x1a, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0xfe, 0x05, 0x0a, 0x25, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x2f, 0x70, 0x6c, - 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x18, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x50, 0x0a, 0x10, 0x49, 0x64, + 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x65, 0x76, + 0x65, 0x6c, 0x12, 0x17, 0x0a, 0x13, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, + 0x54, 0x45, 0x4e, 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, + 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x4e, 0x4f, 0x5f, 0x53, 0x49, + 0x44, 0x45, 0x5f, 0x45, 0x46, 0x46, 0x45, 0x43, 0x54, 0x53, 0x10, 0x01, + 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, + 0x4e, 0x54, 0x10, 0x02, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, + 0x80, 0x80, 0x02, 0x22, 0x9a, 0x03, 0x0a, 0x13, 0x55, 0x6e, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, + 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4e, 0x61, 0x6d, 0x65, + 0x50, 0x61, 0x72, 0x74, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x29, + 0x0a, 0x10, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, + 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x74, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x6e, 0x65, 0x67, 0x61, 0x74, + 0x69, 0x76, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x6e, 0x65, 0x67, + 0x61, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, + 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, + 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, + 0x27, 0x0a, 0x0f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, + 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x4a, 0x0a, 0x08, 0x4e, 0x61, 0x6d, 0x65, + 0x50, 0x61, 0x72, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, + 0x5f, 0x70, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, + 0x08, 0x6e, 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, 0x12, 0x21, 0x0a, + 0x0c, 0x69, 0x73, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x02, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x45, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xa7, 0x02, 0x0a, + 0x0e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, + 0x6e, 0x66, 0x6f, 0x12, 0x44, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, - 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x63, - 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, - 0x05, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x05, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6d, - 0x69, 0x6e, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, - 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x74, - 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x70, 0x61, - 0x74, 0x63, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x75, 0x66, 0x66, 0x69, - 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x75, 0x66, - 0x66, 0x69, 0x78, 0x22, 0xf1, 0x01, 0x0a, 0x14, 0x43, 0x6f, 0x64, 0x65, - 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x66, 0x69, 0x6c, 0x65, - 0x5f, 0x74, 0x6f, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x66, 0x69, 0x6c, 0x65, - 0x54, 0x6f, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x12, 0x1c, - 0x0a, 0x09, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x65, 0x74, 0x65, 0x72, 0x12, 0x43, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x44, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x46, 0x69, 0x6c, - 0x65, 0x12, 0x4c, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, - 0x72, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x63, 0x6f, - 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x52, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, - 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xd6, 0x01, 0x0a, 0x15, - 0x43, 0x6f, 0x64, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, - 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, - 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x48, 0x0a, 0x04, 0x66, - 0x69, 0x6c, 0x65, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, + 0x62, 0x75, 0x66, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, + 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x1a, 0xce, 0x01, 0x0a, 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x70, 0x61, + 0x74, 0x68, 0x12, 0x16, 0x0a, 0x04, 0x73, 0x70, 0x61, 0x6e, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x73, 0x70, + 0x61, 0x6e, 0x12, 0x29, 0x0a, 0x10, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, + 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, + 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2b, 0x0a, + 0x11, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, + 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x10, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x43, 0x6f, + 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x3a, 0x0a, 0x19, 0x6c, 0x65, + 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x63, 0x68, + 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, + 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x17, 0x6c, 0x65, 0x61, 0x64, 0x69, + 0x6e, 0x67, 0x44, 0x65, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x43, 0x6f, + 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xd1, 0x01, 0x0a, 0x11, 0x47, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, + 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x4d, 0x0a, 0x0a, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, + 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x0a, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, + 0x6d, 0x0a, 0x0a, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x16, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, + 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, + 0x66, 0x69, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x14, + 0x0a, 0x05, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x05, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x12, 0x10, 0x0a, 0x03, + 0x65, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, + 0x6e, 0x64, 0x42, 0x8c, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x42, 0x10, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x48, 0x01, 0x5a, 0x3e, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, + 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, + 0x6e, 0x2d, 0x67, 0x6f, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x6f, 0x72, 0x3b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x6f, 0x72, 0xa2, 0x02, 0x03, 0x47, 0x50, 0x42, 0xaa, 0x02, 0x1a, 0x47, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x0a, 0xfe, 0x05, 0x0a, 0x25, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x63, 0x6f, + 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, + 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x18, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x1a, 0x20, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, + 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x63, 0x0a, 0x07, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x61, + 0x6a, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6d, + 0x61, 0x6a, 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x69, 0x6e, 0x6f, + 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6d, 0x69, 0x6e, + 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, + 0x12, 0x16, 0x0a, 0x06, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, + 0x22, 0xf1, 0x01, 0x0a, 0x14, 0x43, 0x6f, 0x64, 0x65, 0x47, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x28, 0x0a, 0x10, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x74, 0x6f, + 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x0e, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x6f, 0x47, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, + 0x72, 0x12, 0x43, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x5f, 0x66, + 0x69, 0x6c, 0x65, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, - 0x2e, 0x43, 0x6f, 0x64, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x46, - 0x69, 0x6c, 0x65, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x1a, 0x5d, 0x0a, - 0x04, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0e, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, - 0x6e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, - 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x42, 0x67, 0x0a, 0x1c, - 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x63, 0x6f, 0x6d, 0x70, - 0x69, 0x6c, 0x65, 0x72, 0x42, 0x0c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6c, 0x61, 0x6e, - 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x67, 0x6f, - 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x3b, 0x70, 0x6c, 0x75, 0x67, - 0x69, 0x6e, 0x5f, 0x67, 0x6f, 0x0a, 0xc3, 0x0b, 0x0a, 0x1f, 0x70, 0x6c, - 0x75, 0x67, 0x69, 0x6e, 0x6c, 0x69, 0x62, 0x5f, 0x64, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x73, 0x77, 0x69, 0x66, 0x74, - 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, - 0x74, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x25, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x63, 0x6f, 0x6d, 0x70, - 0x69, 0x6c, 0x65, 0x72, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa7, 0x04, 0x0a, 0x0f, 0x54, 0x6f, - 0x70, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x31, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, - 0x31, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x32, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, - 0x32, 0x12, 0x3d, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x33, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x73, 0x77, 0x69, 0x66, + 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, + 0x09, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x4c, + 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x5f, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, + 0x6c, 0x65, 0x72, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, + 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xd6, 0x01, 0x0a, 0x15, 0x43, 0x6f, 0x64, + 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, + 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, + 0x72, 0x72, 0x6f, 0x72, 0x12, 0x48, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, + 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x2e, 0x43, 0x6f, + 0x64, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x46, 0x69, 0x6c, 0x65, + 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x1a, 0x5d, 0x0a, 0x04, 0x46, 0x69, + 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x27, + 0x0a, 0x0f, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0e, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, + 0x69, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x42, 0x67, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, + 0x72, 0x42, 0x0c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x73, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x67, 0x6f, 0x2f, 0x70, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x3b, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, + 0x67, 0x6f, 0x0a, 0xc3, 0x0b, 0x0a, 0x1f, 0x70, 0x6c, 0x75, 0x67, 0x69, + 0x6e, 0x6c, 0x69, 0x62, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x6f, 0x72, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x15, 0x73, 0x77, 0x69, 0x66, 0x74, 0x5f, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x74, 0x65, 0x73, + 0x74, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x25, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, + 0x72, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0xa7, 0x04, 0x0a, 0x0f, 0x54, 0x6f, 0x70, 0x4c, 0x65, + 0x76, 0x65, 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x31, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x31, 0x12, 0x16, + 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x32, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x32, 0x12, 0x3d, + 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x33, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x73, 0x77, 0x69, 0x66, 0x74, 0x5f, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x74, 0x65, + 0x73, 0x74, 0x2e, 0x54, 0x6f, 0x70, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x45, + 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, + 0x33, 0x12, 0x48, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x34, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x73, 0x77, 0x69, 0x66, 0x74, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x6f, 0x70, 0x4c, 0x65, 0x76, - 0x65, 0x6c, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x66, 0x69, - 0x65, 0x6c, 0x64, 0x33, 0x12, 0x48, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, - 0x64, 0x34, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x73, - 0x77, 0x69, 0x66, 0x74, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x6f, 0x72, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x6f, 0x70, - 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x2e, 0x53, 0x75, 0x62, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, - 0x66, 0x69, 0x65, 0x6c, 0x64, 0x34, 0x12, 0x4b, 0x0a, 0x06, 0x66, 0x69, - 0x65, 0x6c, 0x64, 0x35, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, + 0x65, 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x53, 0x75, + 0x62, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x34, 0x12, 0x4b, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, + 0x35, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x73, 0x77, + 0x69, 0x66, 0x74, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x6f, 0x72, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x6f, 0x70, 0x4c, + 0x65, 0x76, 0x65, 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, + 0x53, 0x75, 0x62, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, + 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x35, 0x12, 0x41, 0x0a, 0x06, + 0x66, 0x69, 0x65, 0x6c, 0x64, 0x36, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x27, 0x2e, 0x73, 0x77, 0x69, 0x66, 0x74, 0x5f, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x74, 0x65, 0x73, 0x74, + 0x2e, 0x54, 0x6f, 0x70, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x32, 0x48, 0x00, 0x52, 0x06, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x36, 0x1a, 0x87, 0x01, 0x0a, 0x0a, 0x53, 0x75, 0x62, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, + 0x65, 0x6c, 0x64, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, + 0x66, 0x69, 0x65, 0x6c, 0x64, 0x31, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, + 0x65, 0x6c, 0x64, 0x32, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x66, 0x69, 0x65, 0x6c, 0x64, 0x32, 0x12, 0x49, 0x0a, 0x06, 0x66, 0x69, + 0x65, 0x6c, 0x64, 0x33, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x73, 0x77, 0x69, 0x66, 0x74, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x6f, 0x70, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x53, 0x75, 0x62, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x48, 0x00, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x35, 0x12, - 0x41, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x36, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x73, 0x77, 0x69, 0x66, 0x74, 0x5f, + 0x65, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x33, 0x22, 0x3c, 0x0a, + 0x07, 0x53, 0x75, 0x62, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, + 0x53, 0x55, 0x42, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x30, 0x10, + 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x55, 0x42, 0x5f, 0x56, 0x41, 0x4c, + 0x55, 0x45, 0x5f, 0x31, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x55, + 0x42, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x32, 0x10, 0x02, 0x42, + 0x03, 0x0a, 0x01, 0x6f, 0x22, 0x8d, 0x01, 0x0a, 0x10, 0x54, 0x6f, 0x70, + 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x32, 0x12, 0x3a, 0x0a, 0x04, 0x6c, 0x65, 0x66, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x73, 0x77, 0x69, 0x66, 0x74, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x6f, 0x70, 0x4c, 0x65, 0x76, 0x65, 0x6c, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 0x48, 0x00, 0x52, 0x06, - 0x66, 0x69, 0x65, 0x6c, 0x64, 0x36, 0x1a, 0x87, 0x01, 0x0a, 0x0a, 0x53, - 0x75, 0x62, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x16, 0x0a, - 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x31, 0x12, 0x16, 0x0a, - 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x32, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x32, 0x12, 0x49, 0x0a, - 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x33, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x31, 0x2e, 0x73, 0x77, 0x69, 0x66, 0x74, 0x5f, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x74, 0x65, 0x73, - 0x74, 0x2e, 0x54, 0x6f, 0x70, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x53, 0x75, 0x62, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x33, - 0x22, 0x3c, 0x0a, 0x07, 0x53, 0x75, 0x62, 0x45, 0x6e, 0x75, 0x6d, 0x12, - 0x0f, 0x0a, 0x0b, 0x53, 0x55, 0x42, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, - 0x5f, 0x30, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x55, 0x42, 0x5f, - 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x31, 0x10, 0x01, 0x12, 0x0f, 0x0a, - 0x0b, 0x53, 0x55, 0x42, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x32, - 0x10, 0x02, 0x42, 0x03, 0x0a, 0x01, 0x6f, 0x22, 0x8d, 0x01, 0x0a, 0x10, - 0x54, 0x6f, 0x70, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x32, 0x12, 0x3a, 0x0a, 0x04, 0x6c, 0x65, 0x66, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x73, 0x77, 0x69, - 0x66, 0x74, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, - 0x72, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x6f, 0x70, 0x4c, 0x65, - 0x76, 0x65, 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x04, - 0x6c, 0x65, 0x66, 0x74, 0x12, 0x3d, 0x0a, 0x05, 0x72, 0x69, 0x67, 0x68, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x73, 0x77, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x04, 0x6c, 0x65, 0x66, + 0x74, 0x12, 0x3d, 0x0a, 0x05, 0x72, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x73, 0x77, 0x69, 0x66, 0x74, + 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, + 0x74, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x6f, 0x70, 0x4c, 0x65, 0x76, 0x65, + 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 0x52, 0x05, 0x72, + 0x69, 0x67, 0x68, 0x74, 0x22, 0x79, 0x0a, 0x0c, 0x45, 0x78, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x66, 0x73, 0x12, 0x34, 0x0a, 0x04, + 0x64, 0x65, 0x73, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x04, 0x64, 0x65, + 0x73, 0x63, 0x12, 0x33, 0x0a, 0x03, 0x76, 0x65, 0x72, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x63, 0x6f, + 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x52, 0x03, 0x76, 0x65, 0x72, 0x22, 0xd6, 0x01, 0x0a, 0x0c, + 0x53, 0x63, 0x6f, 0x70, 0x65, 0x72, 0x46, 0x6f, 0x72, 0x45, 0x78, 0x74, + 0x32, 0x61, 0x0a, 0x08, 0x65, 0x78, 0x74, 0x5f, 0x65, 0x6e, 0x75, 0x6d, + 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xb9, 0x85, + 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x73, 0x77, 0x69, 0x66, + 0x74, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, + 0x5f, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x6f, 0x70, 0x4c, 0x65, 0x76, + 0x65, 0x6c, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x07, 0x65, 0x78, 0x74, 0x45, + 0x6e, 0x75, 0x6d, 0x32, 0x63, 0x0a, 0x07, 0x65, 0x78, 0x74, 0x5f, 0x6d, + 0x73, 0x67, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0xba, 0x85, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x73, 0x77, 0x69, 0x66, 0x74, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x6f, 0x70, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, - 0x52, 0x05, 0x72, 0x69, 0x67, 0x68, 0x74, 0x22, 0x79, 0x0a, 0x0c, 0x45, - 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x66, 0x73, 0x12, - 0x34, 0x0a, 0x04, 0x64, 0x65, 0x73, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, - 0x04, 0x64, 0x65, 0x73, 0x63, 0x12, 0x33, 0x0a, 0x03, 0x76, 0x65, 0x72, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x2e, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x76, 0x65, 0x72, 0x22, 0xd6, - 0x01, 0x0a, 0x0c, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x72, 0x46, 0x6f, 0x72, - 0x45, 0x78, 0x74, 0x32, 0x61, 0x0a, 0x08, 0x65, 0x78, 0x74, 0x5f, 0x65, - 0x6e, 0x75, 0x6d, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0xb9, 0x85, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x73, - 0x77, 0x69, 0x66, 0x74, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x6f, 0x72, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x6f, 0x70, - 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x07, 0x65, - 0x78, 0x74, 0x45, 0x6e, 0x75, 0x6d, 0x32, 0x63, 0x0a, 0x07, 0x65, 0x78, - 0x74, 0x5f, 0x6d, 0x73, 0x67, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0xba, 0x85, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, - 0x2e, 0x73, 0x77, 0x69, 0x66, 0x74, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x54, - 0x6f, 0x70, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x32, 0x52, 0x06, 0x65, 0x78, 0x74, 0x4d, 0x73, 0x67, 0x2a, - 0x3c, 0x0a, 0x0c, 0x54, 0x6f, 0x70, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x45, - 0x6e, 0x75, 0x6d, 0x12, 0x0e, 0x0a, 0x0a, 0x56, 0x41, 0x4c, 0x55, 0x45, - 0x5f, 0x5a, 0x45, 0x52, 0x4f, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x56, - 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x12, 0x0d, - 0x0a, 0x09, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x54, 0x57, 0x4f, 0x10, - 0x02, 0x32, 0xb1, 0x01, 0x0a, 0x0b, 0x53, 0x6f, 0x6d, 0x65, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4a, 0x0a, 0x03, 0x46, 0x6f, 0x6f, - 0x12, 0x20, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, - 0x72, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x56, 0x0a, - 0x03, 0x42, 0x61, 0x72, 0x12, 0x26, 0x2e, 0x73, 0x77, 0x69, 0x66, 0x74, - 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, - 0x74, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x6f, 0x70, 0x4c, 0x65, 0x76, 0x65, - 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x27, 0x2e, 0x73, - 0x77, 0x69, 0x66, 0x74, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x6f, 0x72, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x6f, 0x70, - 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x32, 0x3a, 0x38, 0x0a, 0x07, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x74, 0x72, - 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x90, 0xbf, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x78, 0x74, 0x53, 0x74, 0x72, 0x42, - 0x06, 0xba, 0x02, 0x03, 0x53, 0x44, 0x54, 0x0a, 0x85, 0x02, 0x0a, 0x32, - 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, - 0x79, 0x2f, 0x73, 0x77, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, - 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x18, 0x73, 0x77, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, + 0x52, 0x06, 0x65, 0x78, 0x74, 0x4d, 0x73, 0x67, 0x2a, 0x3c, 0x0a, 0x0c, + 0x54, 0x6f, 0x70, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x45, 0x6e, 0x75, 0x6d, + 0x12, 0x0e, 0x0a, 0x0a, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x5a, 0x45, + 0x52, 0x4f, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x56, 0x41, 0x4c, 0x55, + 0x45, 0x5f, 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x56, + 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x54, 0x57, 0x4f, 0x10, 0x02, 0x32, 0xb1, + 0x01, 0x0a, 0x0b, 0x53, 0x6f, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x12, 0x4a, 0x0a, 0x03, 0x46, 0x6f, 0x6f, 0x12, 0x20, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x2e, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x56, 0x0a, 0x03, 0x42, 0x61, + 0x72, 0x12, 0x26, 0x2e, 0x73, 0x77, 0x69, 0x66, 0x74, 0x5f, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x74, 0x65, 0x73, + 0x74, 0x2e, 0x54, 0x6f, 0x70, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x27, 0x2e, 0x73, 0x77, 0x69, 0x66, + 0x74, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, + 0x5f, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x6f, 0x70, 0x4c, 0x65, 0x76, + 0x65, 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 0x3a, 0x38, + 0x0a, 0x07, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x12, 0x1d, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x90, 0xbf, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x65, 0x78, 0x74, 0x53, 0x74, 0x72, 0x42, 0x06, 0xba, 0x02, + 0x03, 0x53, 0x44, 0x54, 0x0a, 0x85, 0x02, 0x0a, 0x32, 0x50, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x2f, 0x73, + 0x77, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x6d, 0x61, 0x70, + 0x70, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x18, 0x73, 0x77, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x67, 0x65, 0x6e, 0x5f, 0x73, 0x77, 0x69, 0x66, + 0x74, 0x22, 0xac, 0x01, 0x0a, 0x0e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, + 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x48, 0x0a, 0x07, + 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x2e, 0x2e, 0x73, 0x77, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x67, 0x65, 0x6e, 0x5f, 0x73, - 0x77, 0x69, 0x66, 0x74, 0x22, 0xac, 0x01, 0x0a, 0x0e, 0x4d, 0x6f, 0x64, - 0x75, 0x6c, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x12, - 0x48, 0x0a, 0x07, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x73, 0x77, 0x69, 0x66, 0x74, - 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x67, 0x65, - 0x6e, 0x5f, 0x73, 0x77, 0x69, 0x66, 0x74, 0x2e, 0x4d, 0x6f, 0x64, 0x75, - 0x6c, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, - 0x67, 0x1a, 0x50, 0x0a, 0x05, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x1f, - 0x0a, 0x0b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x6f, 0x64, - 0x75, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x70, 0x61, - 0x74, 0x68, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x46, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33 + 0x77, 0x69, 0x66, 0x74, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x4d, + 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x07, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x1a, 0x50, + 0x0a, 0x05, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, + 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x46, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33 ] let fileDesciptorSetData = Data(bytes: fileDesciptorSetBytes) diff --git a/Tests/SwiftProtobufTests/Test_Any.swift b/Tests/SwiftProtobufTests/Test_Any.swift index dda43dbc6..f9969ae57 100644 --- a/Tests/SwiftProtobufTests/Test_Any.swift +++ b/Tests/SwiftProtobufTests/Test_Any.swift @@ -219,9 +219,9 @@ class Test_Any: XCTestCase { func test_Any_Any() throws { let start = "{\"optionalAny\":{\"@type\":\"type.googleapis.com/google.protobuf.Any\",\"value\":{\"@type\":\"type.googleapis.com/google.protobuf.Int32Value\",\"value\":1}}}" - let decoded: ProtobufTestMessages_Proto3_TestAllTypes + let decoded: ProtobufTestMessages_Proto3_TestAllTypesProto3 do { - decoded = try ProtobufTestMessages_Proto3_TestAllTypes(jsonString: start) + decoded = try ProtobufTestMessages_Proto3_TestAllTypesProto3(jsonString: start) } catch { XCTFail("Failed to decode \(start)") return @@ -251,9 +251,9 @@ class Test_Any: XCTestCase { } XCTAssertEqual(protobuf, Data(bytes: [138, 19, 95, 10, 39, 116, 121, 112, 101, 46, 103, 111, 111, 103, 108, 101, 97, 112, 105, 115, 46, 99, 111, 109, 47, 103, 111, 111, 103, 108, 101, 46, 112, 114, 111, 116, 111, 98, 117, 102, 46, 65, 110, 121, 18, 52, 10, 46, 116, 121, 112, 101, 46, 103, 111, 111, 103, 108, 101, 97, 112, 105, 115, 46, 99, 111, 109, 47, 103, 111, 111, 103, 108, 101, 46, 112, 114, 111, 116, 111, 98, 117, 102, 46, 73, 110, 116, 51, 50, 86, 97, 108, 117, 101, 18, 2, 8, 1])) - let redecoded: ProtobufTestMessages_Proto3_TestAllTypes + let redecoded: ProtobufTestMessages_Proto3_TestAllTypesProto3 do { - redecoded = try ProtobufTestMessages_Proto3_TestAllTypes(serializedData: protobuf) + redecoded = try ProtobufTestMessages_Proto3_TestAllTypesProto3(serializedData: protobuf) } catch { XCTFail("Failed to decode \(protobuf)") return @@ -279,7 +279,7 @@ class Test_Any: XCTestCase { func test_Any_Duration_JSON_roundtrip() throws { let start = "{\"optionalAny\":{\"@type\":\"type.googleapis.com/google.protobuf.Duration\",\"value\":\"99.001s\"}}" do { - let decoded = try ProtobufTestMessages_Proto3_TestAllTypes(jsonString: start) + let decoded = try ProtobufTestMessages_Proto3_TestAllTypesProto3(jsonString: start) XCTAssertNotNil(decoded.optionalAny) let anyField = decoded.optionalAny @@ -301,11 +301,11 @@ class Test_Any: XCTestCase { func test_Any_Duration_transcode() throws { let start = "{\"optionalAny\":{\"@type\":\"type.googleapis.com/google.protobuf.Duration\",\"value\":\"99.001s\"}}" do { - let decoded = try ProtobufTestMessages_Proto3_TestAllTypes(jsonString: start) + let decoded = try ProtobufTestMessages_Proto3_TestAllTypesProto3(jsonString: start) let protobuf = try decoded.serializedData() XCTAssertEqual(protobuf, Data(bytes: [138, 19, 54, 10, 44, 116, 121, 112, 101, 46, 103, 111, 111, 103, 108, 101, 97, 112, 105, 115, 46, 99, 111, 109, 47, 103, 111, 111, 103, 108, 101, 46, 112, 114, 111, 116, 111, 98, 117, 102, 46, 68, 117, 114, 97, 116, 105, 111, 110, 18, 6, 8, 99, 16, 192, 132, 61])) do { - let redecoded = try ProtobufTestMessages_Proto3_TestAllTypes(serializedData: protobuf) + let redecoded = try ProtobufTestMessages_Proto3_TestAllTypesProto3(serializedData: protobuf) let json = try redecoded.jsonString() XCTAssertEqual(json, start) } catch let e { @@ -319,7 +319,7 @@ class Test_Any: XCTestCase { func test_Any_FieldMask_JSON_roundtrip() throws { let start = "{\"optionalAny\":{\"@type\":\"type.googleapis.com/google.protobuf.FieldMask\",\"value\":\"foo,bar.bazQuux\"}}" do { - let decoded = try ProtobufTestMessages_Proto3_TestAllTypes(jsonString: start) + let decoded = try ProtobufTestMessages_Proto3_TestAllTypesProto3(jsonString: start) XCTAssertNotNil(decoded.optionalAny) let anyField = decoded.optionalAny do { @@ -339,11 +339,11 @@ class Test_Any: XCTestCase { func test_Any_FieldMask_transcode() throws { let start = "{\"optionalAny\":{\"@type\":\"type.googleapis.com/google.protobuf.FieldMask\",\"value\":\"foo,bar.bazQuux\"}}" do { - let decoded = try ProtobufTestMessages_Proto3_TestAllTypes(jsonString: start) + let decoded = try ProtobufTestMessages_Proto3_TestAllTypesProto3(jsonString: start) let protobuf = try decoded.serializedData() XCTAssertEqual(protobuf, Data(bytes: [138, 19, 68, 10, 45, 116, 121, 112, 101, 46, 103, 111, 111, 103, 108, 101, 97, 112, 105, 115, 46, 99, 111, 109, 47, 103, 111, 111, 103, 108, 101, 46, 112, 114, 111, 116, 111, 98, 117, 102, 46, 70, 105, 101, 108, 100, 77, 97, 115, 107, 18, 19, 10, 3, 102, 111, 111, 10, 12, 98, 97, 114, 46, 98, 97, 122, 95, 113, 117, 117, 120])) do { - let redecoded = try ProtobufTestMessages_Proto3_TestAllTypes(serializedData: protobuf) + let redecoded = try ProtobufTestMessages_Proto3_TestAllTypesProto3(serializedData: protobuf) let json = try redecoded.jsonString() XCTAssertEqual(json, start) } catch let e { @@ -357,7 +357,7 @@ class Test_Any: XCTestCase { func test_Any_Int32Value_JSON_roundtrip() throws { let start = "{\"optionalAny\":{\"@type\":\"type.googleapis.com/google.protobuf.Int32Value\",\"value\":1}}" do { - let decoded = try ProtobufTestMessages_Proto3_TestAllTypes(jsonString: start) + let decoded = try ProtobufTestMessages_Proto3_TestAllTypesProto3(jsonString: start) XCTAssertNotNil(decoded.optionalAny) let anyField = decoded.optionalAny do { @@ -377,11 +377,11 @@ class Test_Any: XCTestCase { func test_Any_Int32Value_transcode() throws { let start = "{\"optionalAny\":{\"@type\":\"type.googleapis.com/google.protobuf.Int32Value\",\"value\":1}}" do { - let decoded = try ProtobufTestMessages_Proto3_TestAllTypes(jsonString: start) + let decoded = try ProtobufTestMessages_Proto3_TestAllTypesProto3(jsonString: start) let protobuf = try decoded.serializedData() XCTAssertEqual(protobuf, Data(bytes: [138, 19, 52, 10, 46, 116, 121, 112, 101, 46, 103, 111, 111, 103, 108, 101, 97, 112, 105, 115, 46, 99, 111, 109, 47, 103, 111, 111, 103, 108, 101, 46, 112, 114, 111, 116, 111, 98, 117, 102, 46, 73, 110, 116, 51, 50, 86, 97, 108, 117, 101, 18, 2, 8, 1])) do { - let redecoded = try ProtobufTestMessages_Proto3_TestAllTypes(serializedData: protobuf) + let redecoded = try ProtobufTestMessages_Proto3_TestAllTypesProto3(serializedData: protobuf) let json = try redecoded.jsonString() XCTAssertEqual(json, start) } catch let e { @@ -397,7 +397,7 @@ class Test_Any: XCTestCase { func test_Any_Struct_JSON_roundtrip() throws { let start = "{\"optionalAny\":{\"@type\":\"type.googleapis.com/google.protobuf.Struct\",\"value\":{\"foo\":1}}}" do { - let decoded = try ProtobufTestMessages_Proto3_TestAllTypes(jsonString: start) + let decoded = try ProtobufTestMessages_Proto3_TestAllTypesProto3(jsonString: start) XCTAssertNotNil(decoded.optionalAny) let anyField = decoded.optionalAny do { @@ -417,11 +417,11 @@ class Test_Any: XCTestCase { func test_Any_Struct_transcode() throws { let start = "{\"optionalAny\":{\"@type\":\"type.googleapis.com/google.protobuf.Struct\",\"value\":{\"foo\":1}}}" do { - let decoded = try ProtobufTestMessages_Proto3_TestAllTypes(jsonString: start) + let decoded = try ProtobufTestMessages_Proto3_TestAllTypesProto3(jsonString: start) let protobuf = try decoded.serializedData() XCTAssertEqual(protobuf, Data(bytes: [138, 19, 64, 10, 42, 116, 121, 112, 101, 46, 103, 111, 111, 103, 108, 101, 97, 112, 105, 115, 46, 99, 111, 109, 47, 103, 111, 111, 103, 108, 101, 46, 112, 114, 111, 116, 111, 98, 117, 102, 46, 83, 116, 114, 117, 99, 116, 18, 18, 10, 16, 10, 3, 102, 111, 111, 18, 9, 17, 0, 0, 0, 0, 0, 0, 240, 63])) do { - let redecoded = try ProtobufTestMessages_Proto3_TestAllTypes(serializedData: protobuf) + let redecoded = try ProtobufTestMessages_Proto3_TestAllTypesProto3(serializedData: protobuf) let json = try redecoded.jsonString() XCTAssertEqual(json, start) } catch let e { @@ -435,7 +435,7 @@ class Test_Any: XCTestCase { func test_Any_Timestamp_JSON_roundtrip() throws { let start = "{\"optionalAny\":{\"@type\":\"type.googleapis.com/google.protobuf.Timestamp\",\"value\":\"1970-01-01T00:00:01Z\"}}" do { - let decoded = try ProtobufTestMessages_Proto3_TestAllTypes(jsonString: start) + let decoded = try ProtobufTestMessages_Proto3_TestAllTypesProto3(jsonString: start) XCTAssertNotNil(decoded.optionalAny) let anyField = decoded.optionalAny do { @@ -456,11 +456,11 @@ class Test_Any: XCTestCase { func test_Any_Timestamp_transcode() throws { let start = "{\"optionalAny\":{\"@type\":\"type.googleapis.com/google.protobuf.Timestamp\",\"value\":\"1970-01-01T00:00:01.000000001Z\"}}" do { - let decoded = try ProtobufTestMessages_Proto3_TestAllTypes(jsonString: start) + let decoded = try ProtobufTestMessages_Proto3_TestAllTypesProto3(jsonString: start) let protobuf = try decoded.serializedData() XCTAssertEqual(protobuf, Data(bytes: [138, 19, 53, 10, 45, 116, 121, 112, 101, 46, 103, 111, 111, 103, 108, 101, 97, 112, 105, 115, 46, 99, 111, 109, 47, 103, 111, 111, 103, 108, 101, 46, 112, 114, 111, 116, 111, 98, 117, 102, 46, 84, 105, 109, 101, 115, 116, 97, 109, 112, 18, 4, 8, 1, 16, 1])) do { - let redecoded = try ProtobufTestMessages_Proto3_TestAllTypes(serializedData: protobuf) + let redecoded = try ProtobufTestMessages_Proto3_TestAllTypesProto3(serializedData: protobuf) let json = try redecoded.jsonString() XCTAssertEqual(json, start) } catch let e { @@ -474,7 +474,7 @@ class Test_Any: XCTestCase { func test_Any_ListValue_JSON_roundtrip() throws { let start = "{\"optionalAny\":{\"@type\":\"type.googleapis.com/google.protobuf.ListValue\",\"value\":[\"foo\",1]}}" do { - let decoded = try ProtobufTestMessages_Proto3_TestAllTypes(jsonString: start) + let decoded = try ProtobufTestMessages_Proto3_TestAllTypesProto3(jsonString: start) let anyField = decoded.optionalAny do { let unpacked = try Google_Protobuf_ListValue(unpackingAny: anyField) @@ -493,11 +493,11 @@ class Test_Any: XCTestCase { func test_Any_ListValue_transcode() throws { let start = "{\"optionalAny\":{\"@type\":\"type.googleapis.com/google.protobuf.ListValue\",\"value\":[1,\"abc\"]}}" do { - let decoded = try ProtobufTestMessages_Proto3_TestAllTypes(jsonString: start) + let decoded = try ProtobufTestMessages_Proto3_TestAllTypesProto3(jsonString: start) let protobuf = try decoded.serializedData() XCTAssertEqual(protobuf, Data(bytes: [138, 19, 67, 10, 45, 116, 121, 112, 101, 46, 103, 111, 111, 103, 108, 101, 97, 112, 105, 115, 46, 99, 111, 109, 47, 103, 111, 111, 103, 108, 101, 46, 112, 114, 111, 116, 111, 98, 117, 102, 46, 76, 105, 115, 116, 86, 97, 108, 117, 101, 18, 18, 10, 9, 17, 0, 0, 0, 0, 0, 0, 240, 63, 10, 5, 26, 3, 97, 98, 99])) do { - let redecoded = try ProtobufTestMessages_Proto3_TestAllTypes(serializedData: protobuf) + let redecoded = try ProtobufTestMessages_Proto3_TestAllTypesProto3(serializedData: protobuf) let json = try redecoded.jsonString() XCTAssertEqual(json, start) } catch let e { @@ -512,7 +512,7 @@ class Test_Any: XCTestCase { // Value holding a JSON Struct let start1 = "{\"optionalAny\":{\"@type\":\"type.googleapis.com/google.protobuf.Value\",\"value\":{\"foo\":1}}}" do { - let decoded1 = try ProtobufTestMessages_Proto3_TestAllTypes(jsonString: start1) + let decoded1 = try ProtobufTestMessages_Proto3_TestAllTypesProto3(jsonString: start1) XCTAssertNotNil(decoded1.optionalAny) let anyField = decoded1.optionalAny XCTAssertThrowsError(try Google_Protobuf_Struct(unpackingAny: anyField)) @@ -533,11 +533,11 @@ class Test_Any: XCTestCase { func test_Any_Value_struct_transcode() throws { let start = "{\"optionalAny\":{\"@type\":\"type.googleapis.com/google.protobuf.Value\",\"value\":{\"foo\":1}}}" do { - let decoded = try ProtobufTestMessages_Proto3_TestAllTypes(jsonString: start) + let decoded = try ProtobufTestMessages_Proto3_TestAllTypesProto3(jsonString: start) let protobuf = try decoded.serializedData() XCTAssertEqual(protobuf, Data(bytes: [138, 19, 65, 10, 41, 116, 121, 112, 101, 46, 103, 111, 111, 103, 108, 101, 97, 112, 105, 115, 46, 99, 111, 109, 47, 103, 111, 111, 103, 108, 101, 46, 112, 114, 111, 116, 111, 98, 117, 102, 46, 86, 97, 108, 117, 101, 18, 20, 42, 18, 10, 16, 10, 3, 102, 111, 111, 18, 9, 17, 0, 0, 0, 0, 0, 0, 240, 63])) do { - let redecoded = try ProtobufTestMessages_Proto3_TestAllTypes(serializedData: protobuf) + let redecoded = try ProtobufTestMessages_Proto3_TestAllTypesProto3(serializedData: protobuf) let json = try redecoded.jsonString() XCTAssertEqual(json, start) } catch let e { @@ -552,7 +552,7 @@ class Test_Any: XCTestCase { // Value holding an Int let start2 = "{\"optionalAny\":{\"@type\":\"type.googleapis.com/google.protobuf.Value\",\"value\":1}}" do { - let decoded2 = try ProtobufTestMessages_Proto3_TestAllTypes(jsonString: start2) + let decoded2 = try ProtobufTestMessages_Proto3_TestAllTypesProto3(jsonString: start2) XCTAssertNotNil(decoded2.optionalAny) let anyField = decoded2.optionalAny XCTAssertThrowsError(try Google_Protobuf_Struct(unpackingAny: anyField)) @@ -573,11 +573,11 @@ class Test_Any: XCTestCase { func test_Any_Value_int_transcode() throws { let start = "{\"optionalAny\":{\"@type\":\"type.googleapis.com/google.protobuf.Value\",\"value\":1}}" do { - let decoded = try ProtobufTestMessages_Proto3_TestAllTypes(jsonString: start) + let decoded = try ProtobufTestMessages_Proto3_TestAllTypesProto3(jsonString: start) let protobuf = try decoded.serializedData() XCTAssertEqual(protobuf, Data(bytes: [138, 19, 54, 10, 41, 116, 121, 112, 101, 46, 103, 111, 111, 103, 108, 101, 97, 112, 105, 115, 46, 99, 111, 109, 47, 103, 111, 111, 103, 108, 101, 46, 112, 114, 111, 116, 111, 98, 117, 102, 46, 86, 97, 108, 117, 101, 18, 9, 17, 0, 0, 0, 0, 0, 0, 240, 63])) do { - let redecoded = try ProtobufTestMessages_Proto3_TestAllTypes(serializedData: protobuf) + let redecoded = try ProtobufTestMessages_Proto3_TestAllTypesProto3(serializedData: protobuf) let json = try redecoded.jsonString() XCTAssertEqual(json, start) } catch { @@ -592,7 +592,7 @@ class Test_Any: XCTestCase { // Value holding a String let start3 = "{\"optionalAny\":{\"@type\":\"type.googleapis.com/google.protobuf.Value\",\"value\":\"abc\"}}" do { - let decoded3 = try ProtobufTestMessages_Proto3_TestAllTypes(jsonString: start3) + let decoded3 = try ProtobufTestMessages_Proto3_TestAllTypesProto3(jsonString: start3) let anyField = decoded3.optionalAny XCTAssertThrowsError(try Google_Protobuf_Struct(unpackingAny: anyField)) do { @@ -612,11 +612,11 @@ class Test_Any: XCTestCase { func test_Any_Value_string_transcode() throws { let start = "{\"optionalAny\":{\"@type\":\"type.googleapis.com/google.protobuf.Value\",\"value\":\"abc\"}}" do { - let decoded = try ProtobufTestMessages_Proto3_TestAllTypes(jsonString: start) + let decoded = try ProtobufTestMessages_Proto3_TestAllTypesProto3(jsonString: start) let protobuf = try decoded.serializedData() XCTAssertEqual(protobuf, Data(bytes: [138, 19, 50, 10, 41, 116, 121, 112, 101, 46, 103, 111, 111, 103, 108, 101, 97, 112, 105, 115, 46, 99, 111, 109, 47, 103, 111, 111, 103, 108, 101, 46, 112, 114, 111, 116, 111, 98, 117, 102, 46, 86, 97, 108, 117, 101, 18, 5, 26, 3, 97, 98, 99])) do { - let redecoded = try ProtobufTestMessages_Proto3_TestAllTypes(serializedData: protobuf) + let redecoded = try ProtobufTestMessages_Proto3_TestAllTypesProto3(serializedData: protobuf) let json = try redecoded.jsonString() XCTAssertEqual(json, start) } catch { @@ -628,7 +628,7 @@ class Test_Any: XCTestCase { } func test_Any_OddTypeURL_FromValue() throws { - var msg = ProtobufTestMessages_Proto3_TestAllTypes() + var msg = ProtobufTestMessages_Proto3_TestAllTypesProto3() msg.optionalAny.value = Data(bytes: [0x1a, 0x03, 0x61, 0x62, 0x63]) msg.optionalAny.typeURL = "Odd\nType\" prefix/google.protobuf.Value" let newJSON = try msg.jsonString() @@ -639,7 +639,7 @@ class Test_Any: XCTestCase { let valueMsg = Google_Protobuf_Value.with { $0.stringValue = "abc" } - var msg = ProtobufTestMessages_Proto3_TestAllTypes() + var msg = ProtobufTestMessages_Proto3_TestAllTypesProto3() msg.optionalAny = try Google_Protobuf_Any(message: valueMsg, typePrefix: "Odd\nPrefix\"") let newJSON = try msg.jsonString() XCTAssertEqual(newJSON, "{\"optionalAny\":{\"@type\":\"Odd\\nPrefix\\\"/google.protobuf.Value\",\"value\":\"abc\"}}") diff --git a/Tests/SwiftProtobufTests/Test_Conformance.swift b/Tests/SwiftProtobufTests/Test_Conformance.swift index 469e0de9d..bb6bcd398 100644 --- a/Tests/SwiftProtobufTests/Test_Conformance.swift +++ b/Tests/SwiftProtobufTests/Test_Conformance.swift @@ -18,7 +18,7 @@ import XCTest import SwiftProtobuf class Test_Conformance: XCTestCase, PBTestHelpers { - typealias MessageTestType = ProtobufTestMessages_Proto3_TestAllTypes + typealias MessageTestType = ProtobufTestMessages_Proto3_TestAllTypesProto3 func testFieldNaming() throws { let json = "{\n \"fieldname1\": 1,\n \"fieldName2\": 2,\n \"FieldName3\": 3\n }" @@ -26,7 +26,7 @@ class Test_Conformance: XCTestCase, PBTestHelpers { return (m.fieldname1 == 1) && (m.fieldName2 == 2) && (m.fieldName3 == 3) } do { - let decoded = try ProtobufTestMessages_Proto3_TestAllTypes(jsonString: json) + let decoded = try ProtobufTestMessages_Proto3_TestAllTypesProto3(jsonString: json) let recoded = try decoded.jsonString() XCTAssertEqual(recoded, "{\"fieldname1\":1,\"fieldName2\":2,\"FieldName3\":3}") } catch let e { @@ -41,7 +41,7 @@ class Test_Conformance: XCTestCase, PBTestHelpers { return (m.fieldname1 == 1) && (m.fieldName2 == 2) && (m.fieldName3 == 3) } do { - let decoded = try ProtobufTestMessages_Proto3_TestAllTypes(jsonString: json) + let decoded = try ProtobufTestMessages_Proto3_TestAllTypesProto3(jsonString: json) let recoded = try decoded.jsonString() XCTAssertEqual(recoded, "{\"fieldname1\":1,\"fieldName2\":2,\"FieldName3\":3}") } catch let e { @@ -58,7 +58,7 @@ class Test_Conformance: XCTestCase, PBTestHelpers { func testInt32_min_roundtrip() throws { let json = "{\"optionalInt32\": -2147483648}" do { - let decoded = try ProtobufTestMessages_Proto3_TestAllTypes(jsonString: json) + let decoded = try ProtobufTestMessages_Proto3_TestAllTypesProto3(jsonString: json) let recoded = try decoded.jsonString() XCTAssertEqual(recoded, "{\"optionalInt32\":-2147483648}") } catch { @@ -72,7 +72,7 @@ class Test_Conformance: XCTestCase, PBTestHelpers { func testRepeatedBoolWrapper() { assertJSONDecodeSucceeds("{\"repeatedBoolWrapper\": [true, false]}") { - (o: ProtobufTestMessages_Proto3_TestAllTypes) -> Bool in + (o: ProtobufTestMessages_Proto3_TestAllTypesProto3) -> Bool in return o.repeatedBoolWrapper == [Google_Protobuf_BoolValue(true), Google_Protobuf_BoolValue(false)] } } diff --git a/Tests/SwiftProtobufTests/Test_Duration.swift b/Tests/SwiftProtobufTests/Test_Duration.swift index e70caa5ac..43ffaeb0b 100644 --- a/Tests/SwiftProtobufTests/Test_Duration.swift +++ b/Tests/SwiftProtobufTests/Test_Duration.swift @@ -94,51 +94,51 @@ class Test_Duration: XCTestCase, PBTestHelpers { // Make sure durations work correctly when stored in a field func testJSON_durationField() throws { do { - let valid = try ProtobufTestMessages_Proto3_TestAllTypes(jsonString: "{\"optionalDuration\": \"1.001s\"}") + let valid = try ProtobufTestMessages_Proto3_TestAllTypesProto3(jsonString: "{\"optionalDuration\": \"1.001s\"}") XCTAssertEqual(valid.optionalDuration, Google_Protobuf_Duration(seconds: 1, nanos: 1000000)) } catch { XCTFail("Should have decoded correctly") } - XCTAssertThrowsError(try ProtobufTestMessages_Proto3_TestAllTypes(jsonString: "{\"optionalDuration\": \"-315576000001.000000000s\"}")) + XCTAssertThrowsError(try ProtobufTestMessages_Proto3_TestAllTypesProto3(jsonString: "{\"optionalDuration\": \"-315576000001.000000000s\"}")) - XCTAssertThrowsError(try ProtobufTestMessages_Proto3_TestAllTypes(jsonString: "{\"optionalDuration\": \"315576000001.000000000s\"}")) - XCTAssertThrowsError(try ProtobufTestMessages_Proto3_TestAllTypes(jsonString: "{\"optionalDuration\": \"1.001\"}")) + XCTAssertThrowsError(try ProtobufTestMessages_Proto3_TestAllTypesProto3(jsonString: "{\"optionalDuration\": \"315576000001.000000000s\"}")) + XCTAssertThrowsError(try ProtobufTestMessages_Proto3_TestAllTypesProto3(jsonString: "{\"optionalDuration\": \"1.001\"}")) } func testFieldMember() throws { // Verify behavior when a duration appears as a field on a larger object let json1 = "{\"optionalDuration\": \"-315576000000.999999999s\"}" - let m1 = try ProtobufTestMessages_Proto3_TestAllTypes(jsonString: json1) + let m1 = try ProtobufTestMessages_Proto3_TestAllTypesProto3(jsonString: json1) XCTAssertEqual(m1.optionalDuration.seconds, -315576000000) XCTAssertEqual(m1.optionalDuration.nanos, -999999999) let json2 = "{\"repeatedDuration\": [\"1.5s\", \"-1.5s\"]}" let expected2 = [Google_Protobuf_Duration(seconds:1, nanos:500000000), Google_Protobuf_Duration(seconds:-1, nanos:-500000000)] - let actual2 = try ProtobufTestMessages_Proto3_TestAllTypes(jsonString: json2) + let actual2 = try ProtobufTestMessages_Proto3_TestAllTypesProto3(jsonString: json2) XCTAssertEqual(actual2.repeatedDuration, expected2) } func testTranscode() throws { let jsonMax = "{\"optionalDuration\": \"315576000000.999999999s\"}" - let parsedMax = try ProtobufTestMessages_Proto3_TestAllTypes(jsonString: jsonMax) + let parsedMax = try ProtobufTestMessages_Proto3_TestAllTypesProto3(jsonString: jsonMax) XCTAssertEqual(parsedMax.optionalDuration.seconds, 315576000000) XCTAssertEqual(parsedMax.optionalDuration.nanos, 999999999) XCTAssertEqual(try parsedMax.serializedData(), Data(bytes:[234, 18, 13, 8, 128, 188, 174, 206, 151, 9, 16, 255, 147, 235, 220, 3])) let jsonMin = "{\"optionalDuration\": \"-315576000000.999999999s\"}" - let parsedMin = try ProtobufTestMessages_Proto3_TestAllTypes(jsonString: jsonMin) + let parsedMin = try ProtobufTestMessages_Proto3_TestAllTypesProto3(jsonString: jsonMin) XCTAssertEqual(parsedMin.optionalDuration.seconds, -315576000000) XCTAssertEqual(parsedMin.optionalDuration.nanos, -999999999) XCTAssertEqual(try parsedMin.serializedData(), Data(bytes:[234, 18, 22, 8, 128, 196, 209, 177, 232, 246, 255, 255, 255, 1, 16, 129, 236, 148, 163, 252, 255, 255, 255, 255, 1])) } func testConformance() throws { - let tooSmall = try ProtobufTestMessages_Proto3_TestAllTypes(serializedData: Data(bytes: [234, 18, 11, 8, 255, 195, 209, 177, 232, 246, 255, 255, 255, 1])) + let tooSmall = try ProtobufTestMessages_Proto3_TestAllTypesProto3(serializedData: Data(bytes: [234, 18, 11, 8, 255, 195, 209, 177, 232, 246, 255, 255, 255, 1])) XCTAssertEqual(tooSmall.optionalDuration.seconds, -315576000001) XCTAssertEqual(tooSmall.optionalDuration.nanos, 0) XCTAssertThrowsError(try tooSmall.jsonString()) - let tooBig = try ProtobufTestMessages_Proto3_TestAllTypes(serializedData: Data(bytes: [234, 18, 7, 8, 129, 188, 174, 206, 151, 9])) + let tooBig = try ProtobufTestMessages_Proto3_TestAllTypesProto3(serializedData: Data(bytes: [234, 18, 7, 8, 129, 188, 174, 206, 151, 9])) XCTAssertEqual(tooBig.optionalDuration.seconds, 315576000001) XCTAssertEqual(tooBig.optionalDuration.nanos, 0) XCTAssertThrowsError(try tooBig.jsonString()) @@ -196,7 +196,7 @@ class Test_Duration: XCTestCase, PBTestHelpers { a = 1.9999999999 XCTAssertEqual(a, Google_Protobuf_Duration(seconds: 2, nanos: 0)) - var c = ProtobufTestMessages_Proto3_TestAllTypes() + var c = ProtobufTestMessages_Proto3_TestAllTypesProto3() c.optionalDuration = 100.000000001 XCTAssertEqual(Data(bytes: [234, 18, 4, 8, 100, 16, 1]), try c.serializedData()) XCTAssertEqual("{\"optionalDuration\":\"100.000000001s\"}", try c.jsonString()) diff --git a/Tests/SwiftProtobufTests/Test_FieldMask.swift b/Tests/SwiftProtobufTests/Test_FieldMask.swift index 49657ffff..4ee04373b 100644 --- a/Tests/SwiftProtobufTests/Test_FieldMask.swift +++ b/Tests/SwiftProtobufTests/Test_FieldMask.swift @@ -74,13 +74,13 @@ class Test_FieldMask: XCTestCase, PBTestHelpers { // Make sure field mask works correctly when stored in a field func testJSON_field() throws { do { - let valid = try ProtobufTestMessages_Proto3_TestAllTypes(jsonString: "{\"optionalFieldMask\": \"foo,barBaz\"}") + let valid = try ProtobufTestMessages_Proto3_TestAllTypesProto3(jsonString: "{\"optionalFieldMask\": \"foo,barBaz\"}") XCTAssertEqual(valid.optionalFieldMask, Google_Protobuf_FieldMask(protoPaths: "foo", "bar_baz")) } catch { XCTFail("Should have decoded correctly") } - XCTAssertThrowsError(try ProtobufTestMessages_Proto3_TestAllTypes(jsonString: "{\"optionalFieldMask\": \"foo,bar_bar\"}")) + XCTAssertThrowsError(try ProtobufTestMessages_Proto3_TestAllTypesProto3(jsonString: "{\"optionalFieldMask\": \"foo,bar_bar\"}")) } func testSerializationFailure() { diff --git a/Tests/SwiftProtobufTests/Test_JSON_Conformance.swift b/Tests/SwiftProtobufTests/Test_JSON_Conformance.swift index fd0560b7b..bdb052aa2 100644 --- a/Tests/SwiftProtobufTests/Test_JSON_Conformance.swift +++ b/Tests/SwiftProtobufTests/Test_JSON_Conformance.swift @@ -20,8 +20,8 @@ import SwiftProtobuf class Test_JSON_Conformance: XCTestCase { func assertEmptyDecode(_ json: String, file: XCTestFileArgType = #file, line: UInt = #line) -> () { do { - let decoded = try ProtobufTestMessages_Proto3_TestAllTypes(jsonString: json) - XCTAssertEqual(decoded, ProtobufTestMessages_Proto3_TestAllTypes(), "Decoded object should be equal to empty object: \(decoded)", file: file, line: line) + let decoded = try ProtobufTestMessages_Proto3_TestAllTypesProto3(jsonString: json) + XCTAssertEqual(decoded, ProtobufTestMessages_Proto3_TestAllTypesProto3(), "Decoded object should be equal to empty object: \(decoded)", file: file, line: line) let recoded = try decoded.jsonString() XCTAssertEqual(recoded, "{}", file: file, line: line) let protobuf = try decoded.serializedBytes() @@ -87,10 +87,10 @@ class Test_JSON_Conformance: XCTestCase { func testNullSupport_Value() throws { // BUT: Value fields treat null as a regular value let valueNull = "{\"optionalValue\": null}" - let decoded: ProtobufTestMessages_Proto3_TestAllTypes + let decoded: ProtobufTestMessages_Proto3_TestAllTypesProto3 do { - decoded = try ProtobufTestMessages_Proto3_TestAllTypes(jsonString: valueNull) - XCTAssertNotEqual(decoded, ProtobufTestMessages_Proto3_TestAllTypes()) + decoded = try ProtobufTestMessages_Proto3_TestAllTypesProto3(jsonString: valueNull) + XCTAssertNotEqual(decoded, ProtobufTestMessages_Proto3_TestAllTypesProto3()) } catch let e { XCTFail("Decode failed with error \(e): \(valueNull)") return @@ -114,23 +114,23 @@ class Test_JSON_Conformance: XCTestCase { func testNullSupport_Repeated() throws { // Nulls within repeated lists are errors let json1 = "{\"repeatedBoolWrapper\":[true, null, false]}" - XCTAssertThrowsError(try ProtobufTestMessages_Proto3_TestAllTypes(jsonString: json1)) + XCTAssertThrowsError(try ProtobufTestMessages_Proto3_TestAllTypesProto3(jsonString: json1)) let json2 = "{\"repeatedNestedMessage\":[{}, null]}" - XCTAssertThrowsError(try ProtobufTestMessages_Proto3_TestAllTypes(jsonString: json2)) + XCTAssertThrowsError(try ProtobufTestMessages_Proto3_TestAllTypesProto3(jsonString: json2)) // Make sure the above is failing for the right reason: let json3 = "{\"repeatedNestedMessage\":[{}]}" - let _ = try ProtobufTestMessages_Proto3_TestAllTypes(jsonString: json3) + let _ = try ProtobufTestMessages_Proto3_TestAllTypesProto3(jsonString: json3) let json4 = "{\"repeatedNestedMessage\":[null]}" - XCTAssertThrowsError(try ProtobufTestMessages_Proto3_TestAllTypes(jsonString: json4)) + XCTAssertThrowsError(try ProtobufTestMessages_Proto3_TestAllTypesProto3(jsonString: json4)) } func testNullSupport_RepeatedValue() throws { // BUT: null is valid within repeated Value fields let repeatedValueWithNull = "{\"repeatedValue\": [1, null]}" - let decoded: ProtobufTestMessages_Proto3_TestAllTypes + let decoded: ProtobufTestMessages_Proto3_TestAllTypesProto3 do { - decoded = try ProtobufTestMessages_Proto3_TestAllTypes(jsonString: repeatedValueWithNull) - XCTAssertNotEqual(decoded, ProtobufTestMessages_Proto3_TestAllTypes()) + decoded = try ProtobufTestMessages_Proto3_TestAllTypesProto3(jsonString: repeatedValueWithNull) + XCTAssertNotEqual(decoded, ProtobufTestMessages_Proto3_TestAllTypesProto3()) XCTAssertEqual(decoded.repeatedValue, [Google_Protobuf_Value(numberValue:1), nil as Google_Protobuf_Value]) } catch { XCTFail("Decode failed with error \(error): \(repeatedValueWithNull)") @@ -153,7 +153,7 @@ class Test_JSON_Conformance: XCTestCase { func testNullConformance() { let start = "{\n \"optionalBoolWrapper\": null,\n \"optionalInt32Wrapper\": null,\n \"optionalUint32Wrapper\": null,\n \"optionalInt64Wrapper\": null,\n \"optionalUint64Wrapper\": null,\n \"optionalFloatWrapper\": null,\n \"optionalDoubleWrapper\": null,\n \"optionalStringWrapper\": null,\n \"optionalBytesWrapper\": null,\n \"repeatedBoolWrapper\": null,\n \"repeatedInt32Wrapper\": null,\n \"repeatedUint32Wrapper\": null,\n \"repeatedInt64Wrapper\": null,\n \"repeatedUint64Wrapper\": null,\n \"repeatedFloatWrapper\": null,\n \"repeatedDoubleWrapper\": null,\n \"repeatedStringWrapper\": null,\n \"repeatedBytesWrapper\": null\n }" do { - let t = try ProtobufTestMessages_Proto3_TestAllTypes(jsonString: start) + let t = try ProtobufTestMessages_Proto3_TestAllTypesProto3(jsonString: start) XCTAssertEqual(try t.jsonString(), "{}") } catch { XCTFail() @@ -162,9 +162,9 @@ class Test_JSON_Conformance: XCTestCase { func testValueList() { let start = "{\"optionalValue\":[0,\"hello\"]}" - let t: ProtobufTestMessages_Proto3_TestAllTypes + let t: ProtobufTestMessages_Proto3_TestAllTypesProto3 do { - t = try ProtobufTestMessages_Proto3_TestAllTypes(jsonString: start) + t = try ProtobufTestMessages_Proto3_TestAllTypesProto3(jsonString: start) } catch { XCTFail("Failed to decode: \(start)") return @@ -184,7 +184,7 @@ class Test_JSON_Conformance: XCTestCase { + " }\n" + " }") do { - _ = try ProtobufTestMessages_Proto3_TestAllTypes(jsonString: start) + _ = try ProtobufTestMessages_Proto3_TestAllTypesProto3(jsonString: start) } catch { XCTFail("Failed to decode: \(start)") return diff --git a/Tests/SwiftProtobufTests/Test_Struct.swift b/Tests/SwiftProtobufTests/Test_Struct.swift index 008e30daa..35bf1315d 100644 --- a/Tests/SwiftProtobufTests/Test_Struct.swift +++ b/Tests/SwiftProtobufTests/Test_Struct.swift @@ -65,7 +65,7 @@ class Test_Struct: XCTestCase, PBTestHelpers { // "null" as a field value indicates the field is missing // (Except for Value, where "null" indicates NullValue) do { - let c1 = try ProtobufTestMessages_Proto3_TestAllTypes(jsonString:"{\"optionalStruct\":null}") + let c1 = try ProtobufTestMessages_Proto3_TestAllTypesProto3(jsonString:"{\"optionalStruct\":null}") // null here decodes to an empty field. // See github.com/google/protobuf Issue #1327 XCTAssertEqual(try c1.jsonString(), "{}") @@ -74,7 +74,7 @@ class Test_Struct: XCTestCase, PBTestHelpers { } do { - let c2 = try ProtobufTestMessages_Proto3_TestAllTypes(jsonString:"{\"optionalStruct\":{}}") + let c2 = try ProtobufTestMessages_Proto3_TestAllTypesProto3(jsonString:"{\"optionalStruct\":{}}") XCTAssertNotNil(c2.optionalStruct) XCTAssertEqual(c2.optionalStruct.fields, [:]) } catch let e { @@ -204,7 +204,7 @@ class Test_JSON_Value: XCTestCase, PBTestHelpers { assertJSONDecodeFails("numb") do { - let m1 = try ProtobufTestMessages_Proto3_TestAllTypes(jsonString: "{\"optionalValue\": null}") + let m1 = try ProtobufTestMessages_Proto3_TestAllTypesProto3(jsonString: "{\"optionalValue\": null}") XCTAssertEqual(try m1.jsonString(), "{\"optionalValue\":null}") XCTAssertEqual(try m1.serializedBytes(), [146, 19, 2, 8, 0]) } catch { @@ -334,9 +334,9 @@ class Test_JSON_Value: XCTestCase, PBTestHelpers { + " }\n" + " }\n" + "}\n") - let m: ProtobufTestMessages_Proto3_TestAllTypes + let m: ProtobufTestMessages_Proto3_TestAllTypesProto3 do { - m = try ProtobufTestMessages_Proto3_TestAllTypes(jsonString: json) + m = try ProtobufTestMessages_Proto3_TestAllTypesProto3(jsonString: json) } catch { XCTFail("Decoding failed: \(json)") return @@ -388,7 +388,7 @@ class Test_JSON_Value: XCTestCase, PBTestHelpers { + " \"optionalStruct\": null\n" + "}\n") do { - let decoded = try ProtobufTestMessages_Proto3_TestAllTypes(jsonString: json) + let decoded = try ProtobufTestMessages_Proto3_TestAllTypesProto3(jsonString: json) let recoded = try decoded.jsonString() XCTAssertEqual(recoded, "{}") } catch { diff --git a/Tests/SwiftProtobufTests/Test_Timestamp.swift b/Tests/SwiftProtobufTests/Test_Timestamp.swift index 7c5e83065..2b9a7d32a 100644 --- a/Tests/SwiftProtobufTests/Test_Timestamp.swift +++ b/Tests/SwiftProtobufTests/Test_Timestamp.swift @@ -235,24 +235,24 @@ class Test_Timestamp: XCTestCase, PBTestHelpers { func testJSON_timestampField() throws { do { - let valid = try ProtobufTestMessages_Proto3_TestAllTypes(jsonString: "{\"optionalTimestamp\": \"0001-01-01T00:00:00Z\"}") + let valid = try ProtobufTestMessages_Proto3_TestAllTypesProto3(jsonString: "{\"optionalTimestamp\": \"0001-01-01T00:00:00Z\"}") XCTAssertEqual(valid.optionalTimestamp, Google_Protobuf_Timestamp(seconds: -62135596800)) } catch { XCTFail("Should have decoded correctly") } - XCTAssertThrowsError(try ProtobufTestMessages_Proto3_TestAllTypes(jsonString: "{\"optionalTimestamp\": \"10000-01-01T00:00:00Z\"}")) - XCTAssertThrowsError(try ProtobufTestMessages_Proto3_TestAllTypes(jsonString: "{\"optionalTimestamp\": \"0001-01-01T00:00:00\"}")) - XCTAssertThrowsError(try ProtobufTestMessages_Proto3_TestAllTypes(jsonString: "{\"optionalTimestamp\": \"0001-01-01 00:00:00Z\"}")) - XCTAssertThrowsError(try ProtobufTestMessages_Proto3_TestAllTypes(jsonString: "{\"optionalTimestamp\": \"0001-01-01T00:00:00z\"}")) - XCTAssertThrowsError(try ProtobufTestMessages_Proto3_TestAllTypes(jsonString: "{\"optionalTimestamp\": \"0001-01-01t00:00:00Z\"}")) + XCTAssertThrowsError(try ProtobufTestMessages_Proto3_TestAllTypesProto3(jsonString: "{\"optionalTimestamp\": \"10000-01-01T00:00:00Z\"}")) + XCTAssertThrowsError(try ProtobufTestMessages_Proto3_TestAllTypesProto3(jsonString: "{\"optionalTimestamp\": \"0001-01-01T00:00:00\"}")) + XCTAssertThrowsError(try ProtobufTestMessages_Proto3_TestAllTypesProto3(jsonString: "{\"optionalTimestamp\": \"0001-01-01 00:00:00Z\"}")) + XCTAssertThrowsError(try ProtobufTestMessages_Proto3_TestAllTypesProto3(jsonString: "{\"optionalTimestamp\": \"0001-01-01T00:00:00z\"}")) + XCTAssertThrowsError(try ProtobufTestMessages_Proto3_TestAllTypesProto3(jsonString: "{\"optionalTimestamp\": \"0001-01-01t00:00:00Z\"}")) } // A couple more test cases transcribed from conformance test func testJSON_conformance() throws { let t1 = Google_Protobuf_Timestamp(seconds: 0, nanos: 10000000) - var m1 = ProtobufTestMessages_Proto3_TestAllTypes() + var m1 = ProtobufTestMessages_Proto3_TestAllTypesProto3() m1.optionalTimestamp = t1 let expected1 = "{\"optionalTimestamp\":\"1970-01-01T00:00:00.010Z\"}" XCTAssertEqual(try m1.jsonString(), expected1) @@ -260,7 +260,7 @@ class Test_Timestamp: XCTestCase, PBTestHelpers { let json2 = "{\"optionalTimestamp\": \"1970-01-01T00:00:00.010000000Z\"}" let expected2 = "{\"optionalTimestamp\":\"1970-01-01T00:00:00.010Z\"}" do { - let m2 = try ProtobufTestMessages_Proto3_TestAllTypes(jsonString: json2) + let m2 = try ProtobufTestMessages_Proto3_TestAllTypesProto3(jsonString: json2) do { let recoded2 = try m2.jsonString() XCTAssertEqual(recoded2, expected2) @@ -273,7 +273,7 @@ class Test_Timestamp: XCTestCase, PBTestHelpers { // Extra spaces around all the tokens. let json3 = " { \"repeatedTimestamp\" : [ \"0001-01-01T00:00:00Z\" , \"9999-12-31T23:59:59.999999999Z\" ] } " - let m3 = try ProtobufTestMessages_Proto3_TestAllTypes(jsonString: json3) + let m3 = try ProtobufTestMessages_Proto3_TestAllTypesProto3(jsonString: json3) let expected3 = [Google_Protobuf_Timestamp(seconds: -62135596800), Google_Protobuf_Timestamp(seconds: 253402300799, nanos: 999999999)] XCTAssertEqual(m3.repeatedTimestamp, expected3) diff --git a/Tests/SwiftProtobufTests/Test_Wrappers.swift b/Tests/SwiftProtobufTests/Test_Wrappers.swift index 297bcca03..cbc301c5c 100644 --- a/Tests/SwiftProtobufTests/Test_Wrappers.swift +++ b/Tests/SwiftProtobufTests/Test_Wrappers.swift @@ -41,7 +41,7 @@ class Test_Wrappers: XCTestCase { XCTAssertEqual("1", try m.jsonString()) XCTAssertEqual([9,0,0,0,0,0,0,240,63], try m.serializedBytes()) - let mw = try ProtobufTestMessages_Proto3_TestAllTypes( + let mw = try ProtobufTestMessages_Proto3_TestAllTypesProto3( jsonString: "{\"optionalDoubleWrapper\":null}") XCTAssertFalse(mw.hasOptionalDoubleWrapper) @@ -79,7 +79,7 @@ class Test_Wrappers: XCTestCase { XCTAssertEqual("1", try m.jsonString()) XCTAssertEqual([13,0,0,128,63], try m.serializedBytes()) - let mw = try ProtobufTestMessages_Proto3_TestAllTypes( + let mw = try ProtobufTestMessages_Proto3_TestAllTypesProto3( jsonString: "{\"optionalFloatWrapper\":null}") XCTAssertFalse(mw.hasOptionalFloatWrapper) @@ -123,7 +123,7 @@ class Test_Wrappers: XCTestCase { XCTAssertEqual([8,137,6], try m.serializedBytes()) // TODO: More - let mw = try ProtobufTestMessages_Proto3_TestAllTypes( + let mw = try ProtobufTestMessages_Proto3_TestAllTypesProto3( jsonString: "{\"optionalInt64Wrapper\":null}") XCTAssertFalse(mw.hasOptionalInt64Wrapper) @@ -142,7 +142,7 @@ class Test_Wrappers: XCTestCase { XCTAssertEqual([8,137,6], try m.serializedBytes()) // TODO: More - let mw = try ProtobufTestMessages_Proto3_TestAllTypes( + let mw = try ProtobufTestMessages_Proto3_TestAllTypesProto3( jsonString: "{\"optionalUInt64Wrapper\":null}") XCTAssertFalse(mw.hasOptionalUint64Wrapper) @@ -161,7 +161,7 @@ class Test_Wrappers: XCTestCase { XCTAssertEqual([8,137,6], try m.serializedBytes()) // TODO: More - let mw = try ProtobufTestMessages_Proto3_TestAllTypes( + let mw = try ProtobufTestMessages_Proto3_TestAllTypesProto3( jsonString: "{\"optionalInt32Wrapper\":null}") XCTAssertFalse(mw.hasOptionalInt32Wrapper) @@ -180,7 +180,7 @@ class Test_Wrappers: XCTestCase { XCTAssertEqual([8,137,6], try m.serializedBytes()) // TODO: More - let mw = try ProtobufTestMessages_Proto3_TestAllTypes( + let mw = try ProtobufTestMessages_Proto3_TestAllTypesProto3( jsonString: "{\"optionalUInt32Wrapper\":null}") XCTAssertFalse(mw.hasOptionalUint32Wrapper) @@ -199,7 +199,7 @@ class Test_Wrappers: XCTestCase { XCTAssertEqual([8,1], try m.serializedBytes()) // TODO: More - let mw = try ProtobufTestMessages_Proto3_TestAllTypes( + let mw = try ProtobufTestMessages_Proto3_TestAllTypesProto3( jsonString: "{\"optionalBoolWrapper\":null}") XCTAssertFalse(mw.hasOptionalBoolWrapper) @@ -218,7 +218,7 @@ class Test_Wrappers: XCTestCase { XCTAssertEqual([10,3,97,98,99], try m.serializedBytes()) // TODO: More - let mw = try ProtobufTestMessages_Proto3_TestAllTypes( + let mw = try ProtobufTestMessages_Proto3_TestAllTypesProto3( jsonString: "{\"optionalStringWrapper\":null}") XCTAssertFalse(mw.hasOptionalStringWrapper) @@ -241,7 +241,7 @@ class Test_Wrappers: XCTestCase { XCTAssertEqual([10,3,0,1,2], try m.serializedBytes()) // TODO: More - let mw = try ProtobufTestMessages_Proto3_TestAllTypes( + let mw = try ProtobufTestMessages_Proto3_TestAllTypesProto3( jsonString: "{\"optionalBytesWrapper\":null}") XCTAssertFalse(mw.hasOptionalBytesWrapper) diff --git a/Tests/SwiftProtobufTests/conformance.pb.swift b/Tests/SwiftProtobufTests/conformance.pb.swift index 8dadc271d..1e554ba16 100644 --- a/Tests/SwiftProtobufTests/conformance.pb.swift +++ b/Tests/SwiftProtobufTests/conformance.pb.swift @@ -116,6 +116,11 @@ struct Conformance_ConformanceRequest: SwiftProtobuf.Message { /// Which format should the testee serialize its message to? var requestedOutputFormat: Conformance_WireFormat = .unspecified + /// The full name for the test message to use; for the moment, either: + /// protobuf_test_messages.proto3.TestAllTypesProto3 or + /// protobuf_test_messages.proto2.TestAllTypesProto2. + var messageType: String = String() + var unknownFields = SwiftProtobuf.UnknownStorage() /// The payload (whether protobuf of JSON) is always for a @@ -158,6 +163,7 @@ struct Conformance_ConformanceRequest: SwiftProtobuf.Message { try decoder.decodeSingularStringField(value: &v) if let v = v {self.payload = .jsonPayload(v)} case 3: try decoder.decodeSingularEnumField(value: &self.requestedOutputFormat) + case 4: try decoder.decodeSingularStringField(value: &self.messageType) default: break } } @@ -178,6 +184,9 @@ struct Conformance_ConformanceRequest: SwiftProtobuf.Message { if self.requestedOutputFormat != .unspecified { try visitor.visitSingularEnumField(value: self.requestedOutputFormat, fieldNumber: 3) } + if !self.messageType.isEmpty { + try visitor.visitSingularStringField(value: self.messageType, fieldNumber: 4) + } try unknownFields.traverse(visitor: &visitor) } } @@ -378,11 +387,13 @@ extension Conformance_ConformanceRequest: SwiftProtobuf._MessageImplementationBa 1: .standard(proto: "protobuf_payload"), 2: .standard(proto: "json_payload"), 3: .standard(proto: "requested_output_format"), + 4: .standard(proto: "message_type"), ] func _protobuf_generated_isEqualTo(other: Conformance_ConformanceRequest) -> Bool { if self.payload != other.payload {return false} if self.requestedOutputFormat != other.requestedOutputFormat {return false} + if self.messageType != other.messageType {return false} if unknownFields != other.unknownFields {return false} return true } diff --git a/Tests/SwiftProtobufTests/descriptor.pb.swift b/Tests/SwiftProtobufTests/descriptor.pb.swift index e3df30a89..1412a888d 100644 --- a/Tests/SwiftProtobufTests/descriptor.pb.swift +++ b/Tests/SwiftProtobufTests/descriptor.pb.swift @@ -1437,6 +1437,15 @@ struct Google_Protobuf_FileOptions: SwiftProtobuf.Message, SwiftProtobuf.Extensi /// Clears the value of `pyGenericServices`. Subsequent reads from it will return its default value. mutating func clearPyGenericServices() {_storage._pyGenericServices = nil} + var phpGenericServices: Bool { + get {return _storage._phpGenericServices ?? false} + set {_uniqueStorage()._phpGenericServices = newValue} + } + /// Returns true if `phpGenericServices` has been explicitly set. + var hasPhpGenericServices: Bool {return _storage._phpGenericServices != nil} + /// Clears the value of `phpGenericServices`. Subsequent reads from it will return its default value. + mutating func clearPhpGenericServices() {_storage._phpGenericServices = nil} + /// 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 @@ -1589,6 +1598,7 @@ struct Google_Protobuf_FileOptions: SwiftProtobuf.Message, SwiftProtobuf.Extensi case 16: try decoder.decodeSingularBoolField(value: &_storage._ccGenericServices) case 17: try decoder.decodeSingularBoolField(value: &_storage._javaGenericServices) case 18: try decoder.decodeSingularBoolField(value: &_storage._pyGenericServices) + case 19: try decoder.decodeSingularBoolField(value: &_storage._phpGenericServices) case 20: try decoder.decodeSingularBoolField(value: &_storage._javaGenerateEqualsAndHash) case 23: try decoder.decodeSingularBoolField(value: &_storage._deprecated) case 27: try decoder.decodeSingularBoolField(value: &_storage._javaStringCheckUtf8) @@ -1637,6 +1647,9 @@ struct Google_Protobuf_FileOptions: SwiftProtobuf.Message, SwiftProtobuf.Extensi if let v = _storage._pyGenericServices { try visitor.visitSingularBoolField(value: v, fieldNumber: 18) } + if let v = _storage._phpGenericServices { + try visitor.visitSingularBoolField(value: v, fieldNumber: 19) + } if let v = _storage._javaGenerateEqualsAndHash { try visitor.visitSingularBoolField(value: v, fieldNumber: 20) } @@ -3555,6 +3568,7 @@ extension Google_Protobuf_FileOptions: SwiftProtobuf._MessageImplementationBase, 16: .standard(proto: "cc_generic_services"), 17: .standard(proto: "java_generic_services"), 18: .standard(proto: "py_generic_services"), + 19: .standard(proto: "php_generic_services"), 23: .same(proto: "deprecated"), 31: .standard(proto: "cc_enable_arenas"), 36: .standard(proto: "objc_class_prefix"), @@ -3576,6 +3590,7 @@ extension Google_Protobuf_FileOptions: SwiftProtobuf._MessageImplementationBase, var _ccGenericServices: Bool? = nil var _javaGenericServices: Bool? = nil var _pyGenericServices: Bool? = nil + var _phpGenericServices: Bool? = nil var _deprecated: Bool? = nil var _ccEnableArenas: Bool? = nil var _objcClassPrefix: String? = nil @@ -3600,6 +3615,7 @@ extension Google_Protobuf_FileOptions: SwiftProtobuf._MessageImplementationBase, _ccGenericServices = source._ccGenericServices _javaGenericServices = source._javaGenericServices _pyGenericServices = source._pyGenericServices + _phpGenericServices = source._phpGenericServices _deprecated = source._deprecated _ccEnableArenas = source._ccEnableArenas _objcClassPrefix = source._objcClassPrefix @@ -3633,6 +3649,7 @@ extension Google_Protobuf_FileOptions: SwiftProtobuf._MessageImplementationBase, if _storage._ccGenericServices != other_storage._ccGenericServices {return false} if _storage._javaGenericServices != other_storage._javaGenericServices {return false} if _storage._pyGenericServices != other_storage._pyGenericServices {return false} + if _storage._phpGenericServices != other_storage._phpGenericServices {return false} if _storage._deprecated != other_storage._deprecated {return false} if _storage._ccEnableArenas != other_storage._ccEnableArenas {return false} if _storage._objcClassPrefix != other_storage._objcClassPrefix {return false} diff --git a/Tests/SwiftProtobufTests/test_messages_proto3.pb.swift b/Tests/SwiftProtobufTests/test_messages_proto3.pb.swift index 7e72bd24e..71b6446cf 100644 --- a/Tests/SwiftProtobufTests/test_messages_proto3.pb.swift +++ b/Tests/SwiftProtobufTests/test_messages_proto3.pb.swift @@ -93,8 +93,8 @@ enum ProtobufTestMessages_Proto3_ForeignEnum: SwiftProtobuf.Enum { /// 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. -struct ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf.Message { - static let protoMessageName: String = _protobuf_package + ".TestAllTypes" +struct ProtobufTestMessages_Proto3_TestAllTypesProto3: SwiftProtobuf.Message { + static let protoMessageName: String = _protobuf_package + ".TestAllTypesProto3" /// Singular var optionalInt32: Int32 { @@ -172,8 +172,8 @@ struct ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf.Message { set {_uniqueStorage()._optionalBytes = newValue} } - var optionalNestedMessage: ProtobufTestMessages_Proto3_TestAllTypes.NestedMessage { - get {return _storage._optionalNestedMessage ?? ProtobufTestMessages_Proto3_TestAllTypes.NestedMessage()} + var optionalNestedMessage: ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedMessage { + get {return _storage._optionalNestedMessage ?? ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedMessage()} set {_uniqueStorage()._optionalNestedMessage = newValue} } /// Returns true if `optionalNestedMessage` has been explicitly set. @@ -190,7 +190,7 @@ struct ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf.Message { /// Clears the value of `optionalForeignMessage`. Subsequent reads from it will return its default value. mutating func clearOptionalForeignMessage() {_storage._optionalForeignMessage = nil} - var optionalNestedEnum: ProtobufTestMessages_Proto3_TestAllTypes.NestedEnum { + var optionalNestedEnum: ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedEnum { get {return _storage._optionalNestedEnum} set {_uniqueStorage()._optionalNestedEnum = newValue} } @@ -210,8 +210,8 @@ struct ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf.Message { set {_uniqueStorage()._optionalCord = newValue} } - var recursiveMessage: ProtobufTestMessages_Proto3_TestAllTypes { - get {return _storage._recursiveMessage ?? ProtobufTestMessages_Proto3_TestAllTypes()} + var recursiveMessage: ProtobufTestMessages_Proto3_TestAllTypesProto3 { + get {return _storage._recursiveMessage ?? ProtobufTestMessages_Proto3_TestAllTypesProto3()} set {_uniqueStorage()._recursiveMessage = newValue} } /// Returns true if `recursiveMessage` has been explicitly set. @@ -295,7 +295,7 @@ struct ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf.Message { set {_uniqueStorage()._repeatedBytes = newValue} } - var repeatedNestedMessage: [ProtobufTestMessages_Proto3_TestAllTypes.NestedMessage] { + var repeatedNestedMessage: [ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedMessage] { get {return _storage._repeatedNestedMessage} set {_uniqueStorage()._repeatedNestedMessage = newValue} } @@ -305,7 +305,7 @@ struct ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf.Message { set {_uniqueStorage()._repeatedForeignMessage = newValue} } - var repeatedNestedEnum: [ProtobufTestMessages_Proto3_TestAllTypes.NestedEnum] { + var repeatedNestedEnum: [ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedEnum] { get {return _storage._repeatedNestedEnum} set {_uniqueStorage()._repeatedNestedEnum = newValue} } @@ -401,7 +401,7 @@ struct ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf.Message { set {_uniqueStorage()._mapStringBytes = newValue} } - var mapStringNestedMessage: Dictionary { + var mapStringNestedMessage: Dictionary { get {return _storage._mapStringNestedMessage} set {_uniqueStorage()._mapStringNestedMessage = newValue} } @@ -411,7 +411,7 @@ struct ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf.Message { set {_uniqueStorage()._mapStringForeignMessage = newValue} } - var mapStringNestedEnum: Dictionary { + var mapStringNestedEnum: Dictionary { get {return _storage._mapStringNestedEnum} set {_uniqueStorage()._mapStringNestedEnum = newValue} } @@ -434,10 +434,10 @@ struct ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf.Message { set {_uniqueStorage()._oneofField = .oneofUint32(newValue)} } - var oneofNestedMessage: ProtobufTestMessages_Proto3_TestAllTypes.NestedMessage { + var oneofNestedMessage: ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedMessage { get { if case .oneofNestedMessage(let v)? = _storage._oneofField {return v} - return ProtobufTestMessages_Proto3_TestAllTypes.NestedMessage() + return ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedMessage() } set {_uniqueStorage()._oneofField = .oneofNestedMessage(newValue)} } @@ -490,7 +490,7 @@ struct ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf.Message { set {_uniqueStorage()._oneofField = .oneofDouble(newValue)} } - var oneofEnum: ProtobufTestMessages_Proto3_TestAllTypes.NestedEnum { + var oneofEnum: ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedEnum { get { if case .oneofEnum(let v)? = _storage._oneofField {return v} return .foo @@ -805,16 +805,16 @@ struct ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf.Message { enum OneOf_OneofField: Equatable { case oneofUint32(UInt32) - case oneofNestedMessage(ProtobufTestMessages_Proto3_TestAllTypes.NestedMessage) + case oneofNestedMessage(ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedMessage) case oneofString(String) case oneofBytes(Data) case oneofBool(Bool) case oneofUint64(UInt64) case oneofFloat(Float) case oneofDouble(Double) - case oneofEnum(ProtobufTestMessages_Proto3_TestAllTypes.NestedEnum) + case oneofEnum(ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedEnum) - static func ==(lhs: ProtobufTestMessages_Proto3_TestAllTypes.OneOf_OneofField, rhs: ProtobufTestMessages_Proto3_TestAllTypes.OneOf_OneofField) -> Bool { + static func ==(lhs: ProtobufTestMessages_Proto3_TestAllTypesProto3.OneOf_OneofField, rhs: ProtobufTestMessages_Proto3_TestAllTypesProto3.OneOf_OneofField) -> Bool { switch (lhs, rhs) { case (.oneofUint32(let l), .oneofUint32(let r)): return l == r case (.oneofNestedMessage(let l), .oneofNestedMessage(let r)): return l == r @@ -867,15 +867,15 @@ struct ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf.Message { } struct NestedMessage: SwiftProtobuf.Message { - static let protoMessageName: String = ProtobufTestMessages_Proto3_TestAllTypes.protoMessageName + ".NestedMessage" + static let protoMessageName: String = ProtobufTestMessages_Proto3_TestAllTypesProto3.protoMessageName + ".NestedMessage" var a: Int32 { get {return _storage._a} set {_uniqueStorage()._a = newValue} } - var corecursive: ProtobufTestMessages_Proto3_TestAllTypes { - get {return _storage._corecursive ?? ProtobufTestMessages_Proto3_TestAllTypes()} + var corecursive: ProtobufTestMessages_Proto3_TestAllTypesProto3 { + get {return _storage._corecursive ?? ProtobufTestMessages_Proto3_TestAllTypesProto3()} set {_uniqueStorage()._corecursive = newValue} } /// Returns true if `corecursive` has been explicitly set. @@ -992,9 +992,9 @@ struct ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf.Message { case 68: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: &_storage._mapBoolBool) case 69: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: &_storage._mapStringString) case 70: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: &_storage._mapStringBytes) - case 71: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: &_storage._mapStringNestedMessage) + case 71: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: &_storage._mapStringNestedMessage) case 72: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: &_storage._mapStringForeignMessage) - case 73: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufEnumMap.self, value: &_storage._mapStringNestedEnum) + case 73: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufEnumMap.self, value: &_storage._mapStringNestedEnum) case 74: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufEnumMap.self, value: &_storage._mapStringForeignEnum) case 111: if _storage._oneofField != nil {try decoder.handleConflictingOneOf()} @@ -1002,7 +1002,7 @@ struct ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf.Message { try decoder.decodeSingularUInt32Field(value: &v) if let v = v {_storage._oneofField = .oneofUint32(v)} case 112: - var v: ProtobufTestMessages_Proto3_TestAllTypes.NestedMessage? + var v: ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedMessage? if let current = _storage._oneofField { try decoder.handleConflictingOneOf() if case .oneofNestedMessage(let m) = current {v = m} @@ -1041,7 +1041,7 @@ struct ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf.Message { if let v = v {_storage._oneofField = .oneofDouble(v)} case 119: if _storage._oneofField != nil {try decoder.handleConflictingOneOf()} - var v: ProtobufTestMessages_Proto3_TestAllTypes.NestedEnum? + var v: ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedEnum? try decoder.decodeSingularEnumField(value: &v) if let v = v {_storage._oneofField = .oneofEnum(v)} case 201: try decoder.decodeSingularMessageField(value: &_storage._optionalBoolWrapper) @@ -1279,13 +1279,13 @@ struct ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf.Message { try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: _storage._mapStringBytes, fieldNumber: 70) } if !_storage._mapStringNestedMessage.isEmpty { - try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: _storage._mapStringNestedMessage, fieldNumber: 71) + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: _storage._mapStringNestedMessage, fieldNumber: 71) } if !_storage._mapStringForeignMessage.isEmpty { try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: _storage._mapStringForeignMessage, fieldNumber: 72) } if !_storage._mapStringNestedEnum.isEmpty { - try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufEnumMap.self, value: _storage._mapStringNestedEnum, fieldNumber: 73) + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufEnumMap.self, value: _storage._mapStringNestedEnum, fieldNumber: 73) } if !_storage._mapStringForeignEnum.isEmpty { try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufEnumMap.self, value: _storage._mapStringForeignEnum, fieldNumber: 74) @@ -1508,7 +1508,7 @@ extension ProtobufTestMessages_Proto3_ForeignEnum: SwiftProtobuf._ProtoNameProvi ] } -extension ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { +extension ProtobufTestMessages_Proto3_TestAllTypesProto3: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "optional_int32"), 2: .standard(proto: "optional_int64"), @@ -1647,13 +1647,13 @@ extension ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf._MessageImplem var _optionalBool: Bool = false var _optionalString: String = String() var _optionalBytes: Data = SwiftProtobuf.Internal.emptyData - var _optionalNestedMessage: ProtobufTestMessages_Proto3_TestAllTypes.NestedMessage? = nil + var _optionalNestedMessage: ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedMessage? = nil var _optionalForeignMessage: ProtobufTestMessages_Proto3_ForeignMessage? = nil - var _optionalNestedEnum: ProtobufTestMessages_Proto3_TestAllTypes.NestedEnum = .foo + var _optionalNestedEnum: ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedEnum = .foo var _optionalForeignEnum: ProtobufTestMessages_Proto3_ForeignEnum = .foreignFoo var _optionalStringPiece: String = String() var _optionalCord: String = String() - var _recursiveMessage: ProtobufTestMessages_Proto3_TestAllTypes? = nil + var _recursiveMessage: ProtobufTestMessages_Proto3_TestAllTypesProto3? = nil var _repeatedInt32: [Int32] = [] var _repeatedInt64: [Int64] = [] var _repeatedUint32: [UInt32] = [] @@ -1669,9 +1669,9 @@ extension ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf._MessageImplem var _repeatedBool: [Bool] = [] var _repeatedString: [String] = [] var _repeatedBytes: [Data] = [] - var _repeatedNestedMessage: [ProtobufTestMessages_Proto3_TestAllTypes.NestedMessage] = [] + var _repeatedNestedMessage: [ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedMessage] = [] var _repeatedForeignMessage: [ProtobufTestMessages_Proto3_ForeignMessage] = [] - var _repeatedNestedEnum: [ProtobufTestMessages_Proto3_TestAllTypes.NestedEnum] = [] + var _repeatedNestedEnum: [ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedEnum] = [] var _repeatedForeignEnum: [ProtobufTestMessages_Proto3_ForeignEnum] = [] var _repeatedStringPiece: [String] = [] var _repeatedCord: [String] = [] @@ -1690,11 +1690,11 @@ extension ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf._MessageImplem var _mapBoolBool: Dictionary = [:] var _mapStringString: Dictionary = [:] var _mapStringBytes: Dictionary = [:] - var _mapStringNestedMessage: Dictionary = [:] + var _mapStringNestedMessage: Dictionary = [:] var _mapStringForeignMessage: Dictionary = [:] - var _mapStringNestedEnum: Dictionary = [:] + var _mapStringNestedEnum: Dictionary = [:] var _mapStringForeignEnum: Dictionary = [:] - var _oneofField: ProtobufTestMessages_Proto3_TestAllTypes.OneOf_OneofField? + var _oneofField: ProtobufTestMessages_Proto3_TestAllTypesProto3.OneOf_OneofField? var _optionalBoolWrapper: SwiftProtobuf.Google_Protobuf_BoolValue? = nil var _optionalInt32Wrapper: SwiftProtobuf.Google_Protobuf_Int32Value? = nil var _optionalInt64Wrapper: SwiftProtobuf.Google_Protobuf_Int64Value? = nil @@ -1870,7 +1870,7 @@ extension ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf._MessageImplem return _storage } - func _protobuf_generated_isEqualTo(other: ProtobufTestMessages_Proto3_TestAllTypes) -> Bool { + func _protobuf_generated_isEqualTo(other: ProtobufTestMessages_Proto3_TestAllTypesProto3) -> Bool { if _storage !== other._storage { let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_args: (_StorageClass, _StorageClass)) in let _storage = _args.0 @@ -1995,7 +1995,7 @@ extension ProtobufTestMessages_Proto3_TestAllTypes: SwiftProtobuf._MessageImplem } } -extension ProtobufTestMessages_Proto3_TestAllTypes.NestedEnum: SwiftProtobuf._ProtoNameProviding { +extension ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedEnum: SwiftProtobuf._ProtoNameProviding { static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ -1: .same(proto: "NEG"), 0: .same(proto: "FOO"), @@ -2004,7 +2004,7 @@ extension ProtobufTestMessages_Proto3_TestAllTypes.NestedEnum: SwiftProtobuf._Pr ] } -extension ProtobufTestMessages_Proto3_TestAllTypes.NestedMessage: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { +extension ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedMessage: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "a"), 2: .same(proto: "corecursive"), @@ -2012,7 +2012,7 @@ extension ProtobufTestMessages_Proto3_TestAllTypes.NestedMessage: SwiftProtobuf. fileprivate class _StorageClass { var _a: Int32 = 0 - var _corecursive: ProtobufTestMessages_Proto3_TestAllTypes? = nil + var _corecursive: ProtobufTestMessages_Proto3_TestAllTypesProto3? = nil static let defaultInstance = _StorageClass() @@ -2031,7 +2031,7 @@ extension ProtobufTestMessages_Proto3_TestAllTypes.NestedMessage: SwiftProtobuf. return _storage } - func _protobuf_generated_isEqualTo(other: ProtobufTestMessages_Proto3_TestAllTypes.NestedMessage) -> Bool { + func _protobuf_generated_isEqualTo(other: ProtobufTestMessages_Proto3_TestAllTypesProto3.NestedMessage) -> Bool { if _storage !== other._storage { let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_args: (_StorageClass, _StorageClass)) in let _storage = _args.0