diff --git a/Reference/SwiftProtobuf/google/protobuf/api.pb.swift b/Reference/SwiftProtobuf/google/protobuf/api.pb.swift index acfc88a87..dfa4e0e8d 100644 --- a/Reference/SwiftProtobuf/google/protobuf/api.pb.swift +++ b/Reference/SwiftProtobuf/google/protobuf/api.pb.swift @@ -198,7 +198,7 @@ struct Google_Protobuf_Method: Sendable { /// The mixin construct implies that all methods in `AccessControl` are /// also declared with same name and request/response types in /// `Storage`. A documentation generator or annotation processor will -/// see the effective `Storage.GetAcl` method after inherting +/// see the effective `Storage.GetAcl` method after inheriting /// documentation and annotations as follows: /// /// service Storage { diff --git a/Reference/SwiftProtobuf/google/protobuf/descriptor.pb.swift b/Reference/SwiftProtobuf/google/protobuf/descriptor.pb.swift index 8a3f2a25e..509261786 100644 --- a/Reference/SwiftProtobuf/google/protobuf/descriptor.pb.swift +++ b/Reference/SwiftProtobuf/google/protobuf/descriptor.pb.swift @@ -84,7 +84,7 @@ enum Google_Protobuf_Edition: Enum, Swift.CaseIterable { case edition2024 // = 1001 /// Placeholder editions for testing feature resolution. These should not be - /// used or relyed on outside of tests. + /// used or relied on outside of tests. case edition1TestOnly // = 1 case edition2TestOnly // = 2 case edition99997TestOnly // = 99997 diff --git a/Reference/upstream/google/protobuf/api.pb.swift b/Reference/upstream/google/protobuf/api.pb.swift index acfc88a87..dfa4e0e8d 100644 --- a/Reference/upstream/google/protobuf/api.pb.swift +++ b/Reference/upstream/google/protobuf/api.pb.swift @@ -198,7 +198,7 @@ struct Google_Protobuf_Method: Sendable { /// The mixin construct implies that all methods in `AccessControl` are /// also declared with same name and request/response types in /// `Storage`. A documentation generator or annotation processor will -/// see the effective `Storage.GetAcl` method after inherting +/// see the effective `Storage.GetAcl` method after inheriting /// documentation and annotations as follows: /// /// service Storage { diff --git a/Reference/upstream/google/protobuf/descriptor.pb.swift b/Reference/upstream/google/protobuf/descriptor.pb.swift index 8a3f2a25e..509261786 100644 --- a/Reference/upstream/google/protobuf/descriptor.pb.swift +++ b/Reference/upstream/google/protobuf/descriptor.pb.swift @@ -84,7 +84,7 @@ enum Google_Protobuf_Edition: Enum, Swift.CaseIterable { case edition2024 // = 1001 /// Placeholder editions for testing feature resolution. These should not be - /// used or relyed on outside of tests. + /// used or relied on outside of tests. case edition1TestOnly // = 1 case edition2TestOnly // = 2 case edition99997TestOnly // = 99997 diff --git a/Reference/upstream/google/protobuf/edition_unittest.pb.swift b/Reference/upstream/google/protobuf/edition_unittest.pb.swift index 05d611a28..5812f1f36 100644 --- a/Reference/upstream/google/protobuf/edition_unittest.pb.swift +++ b/Reference/upstream/google/protobuf/edition_unittest.pb.swift @@ -719,6 +719,15 @@ struct EditionUnittest_TestAllTypes: @unchecked Sendable { /// Clears the value of `optionalCord`. Subsequent reads from it will return its default value. mutating func clearOptionalCord() {_uniqueStorage()._optionalCord = nil} + var optionalBytesCord: Data { + get {return _storage._optionalBytesCord ?? Data()} + set {_uniqueStorage()._optionalBytesCord = newValue} + } + /// Returns true if `optionalBytesCord` has been explicitly set. + var hasOptionalBytesCord: Bool {return _storage._optionalBytesCord != nil} + /// Clears the value of `optionalBytesCord`. Subsequent reads from it will return its default value. + mutating func clearOptionalBytesCord() {_uniqueStorage()._optionalBytesCord = nil} + /// Defined in unittest_import_public.proto var optionalPublicImportMessage: ProtobufUnittestImport_PublicImportMessage { get {return _storage._optionalPublicImportMessage ?? ProtobufUnittestImport_PublicImportMessage()} @@ -8569,6 +8578,21 @@ extension EditionUnittest_TestAllExtensions { clearExtensionValue(ext: EditionUnittest_Extensions_optional_cord_extension) } + var EditionUnittest_optionalBytesCordExtension: Data { + get {return getExtensionValue(ext: EditionUnittest_Extensions_optional_bytes_cord_extension) ?? Data()} + set {setExtensionValue(ext: EditionUnittest_Extensions_optional_bytes_cord_extension, value: newValue)} + } + /// Returns true if extension `EditionUnittest_Extensions_optional_bytes_cord_extension` + /// has been explicitly set. + var hasEditionUnittest_optionalBytesCordExtension: Bool { + return hasExtensionValue(ext: EditionUnittest_Extensions_optional_bytes_cord_extension) + } + /// Clears the value of extension `EditionUnittest_Extensions_optional_bytes_cord_extension`. + /// Subsequent reads from it will return its default value. + mutating func clearEditionUnittest_optionalBytesCordExtension() { + clearExtensionValue(ext: EditionUnittest_Extensions_optional_bytes_cord_extension) + } + var EditionUnittest_optionalPublicImportMessageExtension: ProtobufUnittestImport_PublicImportMessage { get {return getExtensionValue(ext: EditionUnittest_Extensions_optional_public_import_message_extension) ?? ProtobufUnittestImport_PublicImportMessage()} set {setExtensionValue(ext: EditionUnittest_Extensions_optional_public_import_message_extension, value: newValue)} @@ -9628,6 +9652,7 @@ let EditionUnittest_EditionUnittest_Extensions: SwiftProtobuf.SimpleExtensionMap EditionUnittest_Extensions_optional_import_enum_extension, EditionUnittest_Extensions_optional_string_piece_extension, EditionUnittest_Extensions_optional_cord_extension, + EditionUnittest_Extensions_optional_bytes_cord_extension, EditionUnittest_Extensions_optional_public_import_message_extension, EditionUnittest_Extensions_optional_lazy_message_extension, EditionUnittest_Extensions_optional_unverified_lazy_message_extension, @@ -9874,6 +9899,11 @@ let EditionUnittest_Extensions_optional_cord_extension = SwiftProtobuf.MessageEx fieldName: "edition_unittest.optional_cord_extension" ) +let EditionUnittest_Extensions_optional_bytes_cord_extension = SwiftProtobuf.MessageExtension, EditionUnittest_TestAllExtensions>( + _protobuf_fieldNumber: 86, + fieldName: "edition_unittest.optional_bytes_cord_extension" +) + let EditionUnittest_Extensions_optional_public_import_message_extension = SwiftProtobuf.MessageExtension, EditionUnittest_TestAllExtensions>( _protobuf_fieldNumber: 26, fieldName: "edition_unittest.optional_public_import_message_extension" @@ -10696,6 +10726,7 @@ extension EditionUnittest_TestAllTypes: SwiftProtobuf.Message, SwiftProtobuf._Me 23: .standard(proto: "optional_import_enum"), 24: .standard(proto: "optional_string_piece"), 25: .standard(proto: "optional_cord"), + 86: .standard(proto: "optional_bytes_cord"), 26: .standard(proto: "optional_public_import_message"), 27: .standard(proto: "optional_lazy_message"), 28: .standard(proto: "optional_unverified_lazy_message"), @@ -10779,6 +10810,7 @@ extension EditionUnittest_TestAllTypes: SwiftProtobuf.Message, SwiftProtobuf._Me var _optionalImportEnum: ProtobufUnittestImport_ImportEnum? = nil var _optionalStringPiece: String? = nil var _optionalCord: String? = nil + var _optionalBytesCord: Data? = nil var _optionalPublicImportMessage: ProtobufUnittestImport_PublicImportMessage? = nil var _optionalLazyMessage: EditionUnittest_TestAllTypes.NestedMessage? = nil var _optionalUnverifiedLazyMessage: EditionUnittest_TestAllTypes.NestedMessage? = nil @@ -10866,6 +10898,7 @@ extension EditionUnittest_TestAllTypes: SwiftProtobuf.Message, SwiftProtobuf._Me _optionalImportEnum = source._optionalImportEnum _optionalStringPiece = source._optionalStringPiece _optionalCord = source._optionalCord + _optionalBytesCord = source._optionalBytesCord _optionalPublicImportMessage = source._optionalPublicImportMessage _optionalLazyMessage = source._optionalLazyMessage _optionalUnverifiedLazyMessage = source._optionalUnverifiedLazyMessage @@ -11005,6 +11038,7 @@ extension EditionUnittest_TestAllTypes: SwiftProtobuf.Message, SwiftProtobuf._Me case 83: try { try decoder.decodeSingularEnumField(value: &_storage._defaultImportEnum) }() case 84: try { try decoder.decodeSingularStringField(value: &_storage._defaultStringPiece) }() case 85: try { try decoder.decodeSingularStringField(value: &_storage._defaultCord) }() + case 86: try { try decoder.decodeSingularBytesField(value: &_storage._optionalBytesCord) }() case 111: try { var v: UInt32? try decoder.decodeSingularUInt32Field(value: &v) @@ -11299,6 +11333,9 @@ extension EditionUnittest_TestAllTypes: SwiftProtobuf.Message, SwiftProtobuf._Me try { if let v = _storage._defaultCord { try visitor.visitSingularStringField(value: v, fieldNumber: 85) } }() + try { if let v = _storage._optionalBytesCord { + try visitor.visitSingularBytesField(value: v, fieldNumber: 86) + } }() switch _storage._oneofField { case .oneofUint32?: try { guard case .oneofUint32(let v)? = _storage._oneofField else { preconditionFailure() } @@ -11363,6 +11400,7 @@ extension EditionUnittest_TestAllTypes: SwiftProtobuf.Message, SwiftProtobuf._Me if _storage._optionalImportEnum != rhs_storage._optionalImportEnum {return false} if _storage._optionalStringPiece != rhs_storage._optionalStringPiece {return false} if _storage._optionalCord != rhs_storage._optionalCord {return false} + if _storage._optionalBytesCord != rhs_storage._optionalBytesCord {return false} if _storage._optionalPublicImportMessage != rhs_storage._optionalPublicImportMessage {return false} if _storage._optionalLazyMessage != rhs_storage._optionalLazyMessage {return false} if _storage._optionalUnverifiedLazyMessage != rhs_storage._optionalUnverifiedLazyMessage {return false} diff --git a/Reference/upstream/google/protobuf/unittest.pb.swift b/Reference/upstream/google/protobuf/unittest.pb.swift index 84efbdbe1..f2e0b8b72 100644 --- a/Reference/upstream/google/protobuf/unittest.pb.swift +++ b/Reference/upstream/google/protobuf/unittest.pb.swift @@ -128,6 +128,55 @@ enum ProtobufUnittest_TestReservedEnumFields: SwiftProtobuf.Enum, Swift.CaseIter } +/// Required and open enum accepts invalid enum values. +enum ProtobufUnittest_ForeignOpenEnum: SwiftProtobuf.Enum, Swift.CaseIterable { + typealias RawValue = Int + case foreignOpenUnknown // = 0 + case foreignOpenFoo // = 4 + case foreignOpenBar // = 5 + case foreignOpenBaz // = 6 + + /// (1 << 32) to generate a 64b bitmask would be + case foreignOpenBax // = 32 + case UNRECOGNIZED(Int) + + init() { + self = .foreignOpenUnknown + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .foreignOpenUnknown + case 4: self = .foreignOpenFoo + case 5: self = .foreignOpenBar + case 6: self = .foreignOpenBaz + case 32: self = .foreignOpenBax + default: self = .UNRECOGNIZED(rawValue) + } + } + + var rawValue: Int { + switch self { + case .foreignOpenUnknown: return 0 + case .foreignOpenFoo: return 4 + case .foreignOpenBar: return 5 + case .foreignOpenBaz: return 6 + case .foreignOpenBax: return 32 + case .UNRECOGNIZED(let i): return i + } + } + + // The compiler won't synthesize support with the UNRECOGNIZED case. + static let allCases: [ProtobufUnittest_ForeignOpenEnum] = [ + .foreignOpenUnknown, + .foreignOpenFoo, + .foreignOpenBar, + .foreignOpenBaz, + .foreignOpenBax, + ] + +} + /// Test an enum that has multiple values with the same number. enum ProtobufUnittest_TestEnumWithDupValue: SwiftProtobuf.Enum, Swift.CaseIterable { typealias RawValue = Int @@ -749,6 +798,15 @@ struct ProtobufUnittest_TestAllTypes: @unchecked Sendable { /// Clears the value of `optionalCord`. Subsequent reads from it will return its default value. mutating func clearOptionalCord() {_uniqueStorage()._optionalCord = nil} + var optionalBytesCord: Data { + get {return _storage._optionalBytesCord ?? Data()} + set {_uniqueStorage()._optionalBytesCord = newValue} + } + /// Returns true if `optionalBytesCord` has been explicitly set. + var hasOptionalBytesCord: Bool {return _storage._optionalBytesCord != nil} + /// Clears the value of `optionalBytesCord`. Subsequent reads from it will return its default value. + mutating func clearOptionalBytesCord() {_uniqueStorage()._optionalBytesCord = nil} + /// Defined in unittest_import_public.proto var optionalPublicImportMessage: ProtobufUnittestImport_PublicImportMessage { get {return _storage._optionalPublicImportMessage ?? ProtobufUnittestImport_PublicImportMessage()} @@ -1858,6 +1916,38 @@ struct ProtobufUnittest_TestRequiredEnum: Sendable { fileprivate var _a: Int32? = nil } +struct ProtobufUnittest_TestRequiredOpenEnum: Sendable { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var requiredEnum: ProtobufUnittest_ForeignOpenEnum { + get {return _requiredEnum ?? .foreignOpenUnknown} + set {_requiredEnum = newValue} + } + /// Returns true if `requiredEnum` has been explicitly set. + var hasRequiredEnum: Bool {return self._requiredEnum != nil} + /// Clears the value of `requiredEnum`. Subsequent reads from it will return its default value. + mutating func clearRequiredEnum() {self._requiredEnum = nil} + + /// A dummy optional field. + var a: Int32 { + get {return _a ?? 0} + set {_a = newValue} + } + /// Returns true if `a` has been explicitly set. + var hasA: Bool {return self._a != nil} + /// Clears the value of `a`. Subsequent reads from it will return its default value. + mutating func clearA() {self._a = nil} + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + fileprivate var _requiredEnum: ProtobufUnittest_ForeignOpenEnum? = nil + fileprivate var _a: Int32? = nil +} + /// TestRequiredEnum + using enum values that won't fit to 64 bitmask. struct ProtobufUnittest_TestRequiredEnumNoMask: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the @@ -3002,6 +3092,7 @@ struct ProtobufUnittest_TestDupFieldNumber: Sendable { /// Clears the value of `a`. Subsequent reads from it will return its default value. mutating func clearA() {self._a = nil} + /// NO_PROTO1 var foo: ProtobufUnittest_TestDupFieldNumber.Foo { get {return _foo ?? ProtobufUnittest_TestDupFieldNumber.Foo()} set {_foo = newValue} @@ -3011,6 +3102,7 @@ struct ProtobufUnittest_TestDupFieldNumber: Sendable { /// Clears the value of `foo`. Subsequent reads from it will return its default value. mutating func clearFoo() {self._foo = nil} + /// NO_PROTO1 var bar: ProtobufUnittest_TestDupFieldNumber.Bar { get {return _bar ?? ProtobufUnittest_TestDupFieldNumber.Bar()} set {_bar = newValue} @@ -3022,11 +3114,13 @@ struct ProtobufUnittest_TestDupFieldNumber: Sendable { var unknownFields = SwiftProtobuf.UnknownStorage() + /// NO_PROTO1 struct Foo: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. + /// NO_PROTO1 var a: Int32 { get {return _a ?? 0} set {_a = newValue} @@ -3043,11 +3137,13 @@ struct ProtobufUnittest_TestDupFieldNumber: Sendable { fileprivate var _a: Int32? = nil } + /// NO_PROTO1 struct Bar: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. + /// NO_PROTO1 var a: Int32 { get {return _a ?? 0} set {_a = newValue} @@ -5340,6 +5436,83 @@ struct ProtobufUnittest_TestMessageSize: Sendable { fileprivate var _m6: Int64? = nil } +struct ProtobufUnittest_OpenEnumMessage: Sendable { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var optOpen: ProtobufUnittest_OpenEnumMessage.TestEnum { + get {return _optOpen ?? .unknown} + set {_optOpen = newValue} + } + /// Returns true if `optOpen` has been explicitly set. + var hasOptOpen: Bool {return self._optOpen != nil} + /// Clears the value of `optOpen`. Subsequent reads from it will return its default value. + mutating func clearOptOpen() {self._optOpen = nil} + + var optClosed: ProtobufUnittest_ForeignEnum { + get {return _optClosed ?? .foreignFoo} + set {_optClosed = newValue} + } + /// Returns true if `optClosed` has been explicitly set. + var hasOptClosed: Bool {return self._optClosed != nil} + /// Clears the value of `optClosed`. Subsequent reads from it will return its default value. + mutating func clearOptClosed() {self._optClosed = nil} + + var repeatedOpen: [ProtobufUnittest_OpenEnumMessage.TestEnum] = [] + + var repeatedClosed: [ProtobufUnittest_ForeignEnum] = [] + + var unknownFields = SwiftProtobuf.UnknownStorage() + + enum TestEnum: SwiftProtobuf.Enum, Swift.CaseIterable { + typealias RawValue = Int + case unknown // = 0 + case foo // = 1 + case bar // = 2 + case baz // = 3 + case UNRECOGNIZED(Int) + + init() { + self = .unknown + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .unknown + case 1: self = .foo + case 2: self = .bar + case 3: self = .baz + default: self = .UNRECOGNIZED(rawValue) + } + } + + var rawValue: Int { + switch self { + case .unknown: return 0 + case .foo: return 1 + case .bar: return 2 + case .baz: return 3 + case .UNRECOGNIZED(let i): return i + } + } + + // The compiler won't synthesize support with the UNRECOGNIZED case. + static let allCases: [ProtobufUnittest_OpenEnumMessage.TestEnum] = [ + .unknown, + .foo, + .bar, + .baz, + ] + + } + + init() {} + + fileprivate var _optOpen: ProtobufUnittest_OpenEnumMessage.TestEnum? = nil + fileprivate var _optClosed: ProtobufUnittest_ForeignEnum? = nil +} + /// Test that RPC services work. struct ProtobufUnittest_FooRequest: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the @@ -8775,6 +8948,21 @@ extension ProtobufUnittest_TestAllExtensions { clearExtensionValue(ext: ProtobufUnittest_Extensions_optional_cord_extension) } + var ProtobufUnittest_optionalBytesCordExtension: Data { + get {return getExtensionValue(ext: ProtobufUnittest_Extensions_optional_bytes_cord_extension) ?? Data()} + set {setExtensionValue(ext: ProtobufUnittest_Extensions_optional_bytes_cord_extension, value: newValue)} + } + /// Returns true if extension `ProtobufUnittest_Extensions_optional_bytes_cord_extension` + /// has been explicitly set. + var hasProtobufUnittest_optionalBytesCordExtension: Bool { + return hasExtensionValue(ext: ProtobufUnittest_Extensions_optional_bytes_cord_extension) + } + /// Clears the value of extension `ProtobufUnittest_Extensions_optional_bytes_cord_extension`. + /// Subsequent reads from it will return its default value. + mutating func clearProtobufUnittest_optionalBytesCordExtension() { + clearExtensionValue(ext: ProtobufUnittest_Extensions_optional_bytes_cord_extension) + } + var ProtobufUnittest_optionalPublicImportMessageExtension: ProtobufUnittestImport_PublicImportMessage { get {return getExtensionValue(ext: ProtobufUnittest_Extensions_optional_public_import_message_extension) ?? ProtobufUnittestImport_PublicImportMessage()} set {setExtensionValue(ext: ProtobufUnittest_Extensions_optional_public_import_message_extension, value: newValue)} @@ -9834,6 +10022,7 @@ let ProtobufUnittest_Unittest_Extensions: SwiftProtobuf.SimpleExtensionMap = [ ProtobufUnittest_Extensions_optional_import_enum_extension, ProtobufUnittest_Extensions_optional_string_piece_extension, ProtobufUnittest_Extensions_optional_cord_extension, + ProtobufUnittest_Extensions_optional_bytes_cord_extension, ProtobufUnittest_Extensions_optional_public_import_message_extension, ProtobufUnittest_Extensions_optional_lazy_message_extension, ProtobufUnittest_Extensions_optional_unverified_lazy_message_extension, @@ -10081,6 +10270,11 @@ let ProtobufUnittest_Extensions_optional_cord_extension = SwiftProtobuf.MessageE fieldName: "protobuf_unittest.optional_cord_extension" ) +let ProtobufUnittest_Extensions_optional_bytes_cord_extension = SwiftProtobuf.MessageExtension, ProtobufUnittest_TestAllExtensions>( + _protobuf_fieldNumber: 86, + fieldName: "protobuf_unittest.optional_bytes_cord_extension" +) + let ProtobufUnittest_Extensions_optional_public_import_message_extension = SwiftProtobuf.MessageExtension, ProtobufUnittest_TestAllExtensions>( _protobuf_fieldNumber: 26, fieldName: "protobuf_unittest.optional_public_import_message_extension" @@ -10762,6 +10956,16 @@ extension ProtobufUnittest_TestReservedEnumFields: SwiftProtobuf._ProtoNameProvi ] } +extension ProtobufUnittest_ForeignOpenEnum: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "FOREIGN_OPEN_UNKNOWN"), + 4: .same(proto: "FOREIGN_OPEN_FOO"), + 5: .same(proto: "FOREIGN_OPEN_BAR"), + 6: .same(proto: "FOREIGN_OPEN_BAZ"), + 32: .same(proto: "FOREIGN_OPEN_BAX"), + ] +} + extension ProtobufUnittest_TestEnumWithDupValue: SwiftProtobuf._ProtoNameProviding { static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .aliased(proto: "FOO1", aliases: ["FOO2"]), @@ -10916,6 +11120,7 @@ extension ProtobufUnittest_TestAllTypes: SwiftProtobuf.Message, SwiftProtobuf._M 23: .standard(proto: "optional_import_enum"), 24: .standard(proto: "optional_string_piece"), 25: .standard(proto: "optional_cord"), + 86: .standard(proto: "optional_bytes_cord"), 26: .standard(proto: "optional_public_import_message"), 27: .standard(proto: "optional_lazy_message"), 28: .standard(proto: "optional_unverified_lazy_message"), @@ -10999,6 +11204,7 @@ extension ProtobufUnittest_TestAllTypes: SwiftProtobuf.Message, SwiftProtobuf._M var _optionalImportEnum: ProtobufUnittestImport_ImportEnum? = nil var _optionalStringPiece: String? = nil var _optionalCord: String? = nil + var _optionalBytesCord: Data? = nil var _optionalPublicImportMessage: ProtobufUnittestImport_PublicImportMessage? = nil var _optionalLazyMessage: ProtobufUnittest_TestAllTypes.NestedMessage? = nil var _optionalUnverifiedLazyMessage: ProtobufUnittest_TestAllTypes.NestedMessage? = nil @@ -11086,6 +11292,7 @@ extension ProtobufUnittest_TestAllTypes: SwiftProtobuf.Message, SwiftProtobuf._M _optionalImportEnum = source._optionalImportEnum _optionalStringPiece = source._optionalStringPiece _optionalCord = source._optionalCord + _optionalBytesCord = source._optionalBytesCord _optionalPublicImportMessage = source._optionalPublicImportMessage _optionalLazyMessage = source._optionalLazyMessage _optionalUnverifiedLazyMessage = source._optionalUnverifiedLazyMessage @@ -11225,6 +11432,7 @@ extension ProtobufUnittest_TestAllTypes: SwiftProtobuf.Message, SwiftProtobuf._M case 83: try { try decoder.decodeSingularEnumField(value: &_storage._defaultImportEnum) }() case 84: try { try decoder.decodeSingularStringField(value: &_storage._defaultStringPiece) }() case 85: try { try decoder.decodeSingularStringField(value: &_storage._defaultCord) }() + case 86: try { try decoder.decodeSingularBytesField(value: &_storage._optionalBytesCord) }() case 111: try { var v: UInt32? try decoder.decodeSingularUInt32Field(value: &v) @@ -11519,6 +11727,9 @@ extension ProtobufUnittest_TestAllTypes: SwiftProtobuf.Message, SwiftProtobuf._M try { if let v = _storage._defaultCord { try visitor.visitSingularStringField(value: v, fieldNumber: 85) } }() + try { if let v = _storage._optionalBytesCord { + try visitor.visitSingularBytesField(value: v, fieldNumber: 86) + } }() switch _storage._oneofField { case .oneofUint32?: try { guard case .oneofUint32(let v)? = _storage._oneofField else { preconditionFailure() } @@ -11583,6 +11794,7 @@ extension ProtobufUnittest_TestAllTypes: SwiftProtobuf.Message, SwiftProtobuf._M if _storage._optionalImportEnum != rhs_storage._optionalImportEnum {return false} if _storage._optionalStringPiece != rhs_storage._optionalStringPiece {return false} if _storage._optionalCord != rhs_storage._optionalCord {return false} + if _storage._optionalBytesCord != rhs_storage._optionalBytesCord {return false} if _storage._optionalPublicImportMessage != rhs_storage._optionalPublicImportMessage {return false} if _storage._optionalLazyMessage != rhs_storage._optionalLazyMessage {return false} if _storage._optionalUnverifiedLazyMessage != rhs_storage._optionalUnverifiedLazyMessage {return false} @@ -12698,6 +12910,53 @@ extension ProtobufUnittest_TestRequiredEnum: SwiftProtobuf.Message, SwiftProtobu } } +extension ProtobufUnittest_TestRequiredOpenEnum: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".TestRequiredOpenEnum" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "required_enum"), + 2: .same(proto: "a"), + ] + + public var isInitialized: Bool { + if self._requiredEnum == nil {return false} + return true + } + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularEnumField(value: &self._requiredEnum) }() + case 2: try { try decoder.decodeSingularInt32Field(value: &self._a) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._requiredEnum { + try visitor.visitSingularEnumField(value: v, fieldNumber: 1) + } }() + try { if let v = self._a { + try visitor.visitSingularInt32Field(value: v, fieldNumber: 2) + } }() + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: ProtobufUnittest_TestRequiredOpenEnum, rhs: ProtobufUnittest_TestRequiredOpenEnum) -> Bool { + if lhs._requiredEnum != rhs._requiredEnum {return false} + if lhs._a != rhs._a {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + extension ProtobufUnittest_TestRequiredEnumNoMask: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".TestRequiredEnumNoMask" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ @@ -17787,6 +18046,69 @@ extension ProtobufUnittest_TestMessageSize: SwiftProtobuf.Message, SwiftProtobuf } } +extension ProtobufUnittest_OpenEnumMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".OpenEnumMessage" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "opt_open"), + 2: .standard(proto: "opt_closed"), + 3: .standard(proto: "repeated_open"), + 4: .standard(proto: "repeated_closed"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularEnumField(value: &self._optOpen) }() + case 2: try { try decoder.decodeSingularEnumField(value: &self._optClosed) }() + case 3: try { try decoder.decodeRepeatedEnumField(value: &self.repeatedOpen) }() + case 4: try { try decoder.decodeRepeatedEnumField(value: &self.repeatedClosed) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._optOpen { + try visitor.visitSingularEnumField(value: v, fieldNumber: 1) + } }() + try { if let v = self._optClosed { + try visitor.visitSingularEnumField(value: v, fieldNumber: 2) + } }() + if !self.repeatedOpen.isEmpty { + try visitor.visitRepeatedEnumField(value: self.repeatedOpen, fieldNumber: 3) + } + if !self.repeatedClosed.isEmpty { + try visitor.visitRepeatedEnumField(value: self.repeatedClosed, fieldNumber: 4) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: ProtobufUnittest_OpenEnumMessage, rhs: ProtobufUnittest_OpenEnumMessage) -> Bool { + if lhs._optOpen != rhs._optOpen {return false} + if lhs._optClosed != rhs._optClosed {return false} + if lhs.repeatedOpen != rhs.repeatedOpen {return false} + if lhs.repeatedClosed != rhs.repeatedClosed {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension ProtobufUnittest_OpenEnumMessage.TestEnum: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "UNKNOWN"), + 1: .same(proto: "FOO"), + 2: .same(proto: "BAR"), + 3: .same(proto: "BAZ"), + ] +} + extension ProtobufUnittest_FooRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".FooRequest" static let _protobuf_nameMap = SwiftProtobuf._NameMap() diff --git a/Reference/upstream/google/protobuf/unittest_lite.pb.swift b/Reference/upstream/google/protobuf/unittest_lite.pb.swift index 2afdcfdde..8c908ccb0 100644 --- a/Reference/upstream/google/protobuf/unittest_lite.pb.swift +++ b/Reference/upstream/google/protobuf/unittest_lite.pb.swift @@ -333,6 +333,15 @@ struct ProtobufUnittest_TestAllTypesLite: @unchecked Sendable { /// Clears the value of `optionalCord`. Subsequent reads from it will return its default value. mutating func clearOptionalCord() {_uniqueStorage()._optionalCord = nil} + var optionalBytesCord: Data { + get {return _storage._optionalBytesCord ?? Data()} + set {_uniqueStorage()._optionalBytesCord = newValue} + } + /// Returns true if `optionalBytesCord` has been explicitly set. + var hasOptionalBytesCord: Bool {return _storage._optionalBytesCord != nil} + /// Clears the value of `optionalBytesCord`. Subsequent reads from it will return its default value. + mutating func clearOptionalBytesCord() {_uniqueStorage()._optionalBytesCord = nil} + /// Defined in unittest_import_public.proto var optionalPublicImportMessage: ProtobufUnittestImport_PublicImportMessageLite { get {return _storage._optionalPublicImportMessage ?? ProtobufUnittestImport_PublicImportMessageLite()} @@ -2107,6 +2116,21 @@ extension ProtobufUnittest_TestAllExtensionsLite { clearExtensionValue(ext: ProtobufUnittest_Extensions_optional_cord_extension_lite) } + var ProtobufUnittest_optionalBytesCordExtensionLite: Data { + get {return getExtensionValue(ext: ProtobufUnittest_Extensions_optional_bytes_cord_extension_lite) ?? Data()} + set {setExtensionValue(ext: ProtobufUnittest_Extensions_optional_bytes_cord_extension_lite, value: newValue)} + } + /// Returns true if extension `ProtobufUnittest_Extensions_optional_bytes_cord_extension_lite` + /// has been explicitly set. + var hasProtobufUnittest_optionalBytesCordExtensionLite: Bool { + return hasExtensionValue(ext: ProtobufUnittest_Extensions_optional_bytes_cord_extension_lite) + } + /// Clears the value of extension `ProtobufUnittest_Extensions_optional_bytes_cord_extension_lite`. + /// Subsequent reads from it will return its default value. + mutating func clearProtobufUnittest_optionalBytesCordExtensionLite() { + clearExtensionValue(ext: ProtobufUnittest_Extensions_optional_bytes_cord_extension_lite) + } + var ProtobufUnittest_optionalPublicImportMessageExtensionLite: ProtobufUnittestImport_PublicImportMessageLite { get {return getExtensionValue(ext: ProtobufUnittest_Extensions_optional_public_import_message_extension_lite) ?? ProtobufUnittestImport_PublicImportMessageLite()} set {setExtensionValue(ext: ProtobufUnittest_Extensions_optional_public_import_message_extension_lite, value: newValue)} @@ -2806,6 +2830,7 @@ let ProtobufUnittest_UnittestLite_Extensions: SwiftProtobuf.SimpleExtensionMap = ProtobufUnittest_Extensions_optional_import_enum_extension_lite, ProtobufUnittest_Extensions_optional_string_piece_extension_lite, ProtobufUnittest_Extensions_optional_cord_extension_lite, + ProtobufUnittest_Extensions_optional_bytes_cord_extension_lite, ProtobufUnittest_Extensions_optional_public_import_message_extension_lite, ProtobufUnittest_Extensions_optional_lazy_message_extension_lite, ProtobufUnittest_Extensions_optional_unverified_lazy_message_extension_lite, @@ -3005,6 +3030,11 @@ let ProtobufUnittest_Extensions_optional_cord_extension_lite = SwiftProtobuf.Mes fieldName: "protobuf_unittest.optional_cord_extension_lite" ) +let ProtobufUnittest_Extensions_optional_bytes_cord_extension_lite = SwiftProtobuf.MessageExtension, ProtobufUnittest_TestAllExtensionsLite>( + _protobuf_fieldNumber: 86, + fieldName: "protobuf_unittest.optional_bytes_cord_extension_lite" +) + let ProtobufUnittest_Extensions_optional_public_import_message_extension_lite = SwiftProtobuf.MessageExtension, ProtobufUnittest_TestAllExtensionsLite>( _protobuf_fieldNumber: 26, fieldName: "protobuf_unittest.optional_public_import_message_extension_lite" @@ -3423,6 +3453,7 @@ extension ProtobufUnittest_TestAllTypesLite: SwiftProtobuf.Message, SwiftProtobu 23: .standard(proto: "optional_import_enum"), 24: .standard(proto: "optional_string_piece"), 25: .standard(proto: "optional_cord"), + 86: .standard(proto: "optional_bytes_cord"), 26: .standard(proto: "optional_public_import_message"), 27: .standard(proto: "optional_lazy_message"), 28: .standard(proto: "optional_unverified_lazy_message"), @@ -3506,6 +3537,7 @@ extension ProtobufUnittest_TestAllTypesLite: SwiftProtobuf.Message, SwiftProtobu var _optionalImportEnum: ProtobufUnittestImport_ImportEnumLite? = nil var _optionalStringPiece: String? = nil var _optionalCord: String? = nil + var _optionalBytesCord: Data? = nil var _optionalPublicImportMessage: ProtobufUnittestImport_PublicImportMessageLite? = nil var _optionalLazyMessage: ProtobufUnittest_TestAllTypesLite.NestedMessage? = nil var _optionalUnverifiedLazyMessage: ProtobufUnittest_TestAllTypesLite.NestedMessage? = nil @@ -3594,6 +3626,7 @@ extension ProtobufUnittest_TestAllTypesLite: SwiftProtobuf.Message, SwiftProtobu _optionalImportEnum = source._optionalImportEnum _optionalStringPiece = source._optionalStringPiece _optionalCord = source._optionalCord + _optionalBytesCord = source._optionalBytesCord _optionalPublicImportMessage = source._optionalPublicImportMessage _optionalLazyMessage = source._optionalLazyMessage _optionalUnverifiedLazyMessage = source._optionalUnverifiedLazyMessage @@ -3734,6 +3767,7 @@ extension ProtobufUnittest_TestAllTypesLite: SwiftProtobuf.Message, SwiftProtobu case 83: try { try decoder.decodeSingularEnumField(value: &_storage._defaultImportEnum) }() case 84: try { try decoder.decodeSingularStringField(value: &_storage._defaultStringPiece) }() case 85: try { try decoder.decodeSingularStringField(value: &_storage._defaultCord) }() + case 86: try { try decoder.decodeSingularBytesField(value: &_storage._optionalBytesCord) }() case 111: try { var v: UInt32? try decoder.decodeSingularUInt32Field(value: &v) @@ -4026,6 +4060,9 @@ extension ProtobufUnittest_TestAllTypesLite: SwiftProtobuf.Message, SwiftProtobu try { if let v = _storage._defaultCord { try visitor.visitSingularStringField(value: v, fieldNumber: 85) } }() + try { if let v = _storage._optionalBytesCord { + try visitor.visitSingularBytesField(value: v, fieldNumber: 86) + } }() switch _storage._oneofField { case .oneofUint32?: try { guard case .oneofUint32(let v)? = _storage._oneofField else { preconditionFailure() } @@ -4088,6 +4125,7 @@ extension ProtobufUnittest_TestAllTypesLite: SwiftProtobuf.Message, SwiftProtobu if _storage._optionalImportEnum != rhs_storage._optionalImportEnum {return false} if _storage._optionalStringPiece != rhs_storage._optionalStringPiece {return false} if _storage._optionalCord != rhs_storage._optionalCord {return false} + if _storage._optionalBytesCord != rhs_storage._optionalBytesCord {return false} if _storage._optionalPublicImportMessage != rhs_storage._optionalPublicImportMessage {return false} if _storage._optionalLazyMessage != rhs_storage._optionalLazyMessage {return false} if _storage._optionalUnverifiedLazyMessage != rhs_storage._optionalUnverifiedLazyMessage {return false} diff --git a/Reference/upstream/google/protobuf/unittest_no_field_presence.pb.swift b/Reference/upstream/google/protobuf/unittest_no_field_presence.pb.swift index e896cc7cd..2938682e7 100644 --- a/Reference/upstream/google/protobuf/unittest_no_field_presence.pb.swift +++ b/Reference/upstream/google/protobuf/unittest_no_field_presence.pb.swift @@ -431,6 +431,24 @@ struct Proto2NofieldpresenceUnittest_TestAllTypes: @unchecked Sendable { fileprivate var _storage = _StorageClass.defaultInstance } +struct Proto2NofieldpresenceUnittest_TestAllMapTypes: Sendable { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var mapInt32Bytes: Dictionary = [:] + + var mapInt32ForeignEnum: Dictionary = [:] + + var mapInt32ForeignMessage: Dictionary = [:] + + var mapInt32ExplicitForeignMessage: Dictionary = [:] + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + struct Proto2NofieldpresenceUnittest_TestProto2Required: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for @@ -1040,6 +1058,56 @@ extension Proto2NofieldpresenceUnittest_TestAllTypes.NestedMessage: SwiftProtobu } } +extension Proto2NofieldpresenceUnittest_TestAllMapTypes: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".TestAllMapTypes" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "map_int32_bytes"), + 2: .standard(proto: "map_int32_foreign_enum"), + 3: .standard(proto: "map_int32_foreign_message"), + 4: .standard(proto: "map_int32_explicit_foreign_message"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: &self.mapInt32Bytes) }() + case 2: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufEnumMap.self, value: &self.mapInt32ForeignEnum) }() + case 3: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: &self.mapInt32ForeignMessage) }() + case 4: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: &self.mapInt32ExplicitForeignMessage) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.mapInt32Bytes.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: self.mapInt32Bytes, fieldNumber: 1) + } + if !self.mapInt32ForeignEnum.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufEnumMap.self, value: self.mapInt32ForeignEnum, fieldNumber: 2) + } + if !self.mapInt32ForeignMessage.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: self.mapInt32ForeignMessage, fieldNumber: 3) + } + if !self.mapInt32ExplicitForeignMessage.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: self.mapInt32ExplicitForeignMessage, fieldNumber: 4) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Proto2NofieldpresenceUnittest_TestAllMapTypes, rhs: Proto2NofieldpresenceUnittest_TestAllMapTypes) -> Bool { + if lhs.mapInt32Bytes != rhs.mapInt32Bytes {return false} + if lhs.mapInt32ForeignEnum != rhs.mapInt32ForeignEnum {return false} + if lhs.mapInt32ForeignMessage != rhs.mapInt32ForeignMessage {return false} + if lhs.mapInt32ExplicitForeignMessage != rhs.mapInt32ExplicitForeignMessage {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + extension Proto2NofieldpresenceUnittest_TestProto2Required: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".TestProto2Required" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ diff --git a/Reference/upstream/google/protobuf/unittest_proto3_arena.pb.swift b/Reference/upstream/google/protobuf/unittest_proto3_arena.pb.swift index 6128b1bde..2cdd10ecb 100644 --- a/Reference/upstream/google/protobuf/unittest_proto3_arena.pb.swift +++ b/Reference/upstream/google/protobuf/unittest_proto3_arena.pb.swift @@ -206,6 +206,11 @@ struct Proto3ArenaUnittest_TestAllTypes: @unchecked Sendable { set {_uniqueStorage()._optionalCord = newValue} } + var optionalBytesCord: Data { + get {return _storage._optionalBytesCord} + set {_uniqueStorage()._optionalBytesCord = newValue} + } + /// Defined in unittest_import_public.proto var optionalPublicImportMessage: ProtobufUnittestImport_PublicImportMessage { get {return _storage._optionalPublicImportMessage ?? ProtobufUnittestImport_PublicImportMessage()} @@ -831,6 +836,7 @@ extension Proto3ArenaUnittest_TestAllTypes: SwiftProtobuf.Message, SwiftProtobuf 22: .standard(proto: "optional_foreign_enum"), 24: .standard(proto: "optional_string_piece"), 25: .standard(proto: "optional_cord"), + 86: .standard(proto: "optional_bytes_cord"), 26: .standard(proto: "optional_public_import_message"), 27: .standard(proto: "optional_lazy_message"), 28: .standard(proto: "optional_unverified_lazy_message"), @@ -902,6 +908,7 @@ extension Proto3ArenaUnittest_TestAllTypes: SwiftProtobuf.Message, SwiftProtobuf var _optionalForeignEnum: Proto3ArenaUnittest_ForeignEnum = .foreignZero var _optionalStringPiece: String = String() var _optionalCord: String = String() + var _optionalBytesCord: Data = Data() var _optionalPublicImportMessage: ProtobufUnittestImport_PublicImportMessage? = nil var _optionalLazyMessage: Proto3ArenaUnittest_TestAllTypes.NestedMessage? = nil var _optionalUnverifiedLazyMessage: Proto3ArenaUnittest_TestAllTypes.NestedMessage? = nil @@ -981,6 +988,7 @@ extension Proto3ArenaUnittest_TestAllTypes: SwiftProtobuf.Message, SwiftProtobuf _optionalForeignEnum = source._optionalForeignEnum _optionalStringPiece = source._optionalStringPiece _optionalCord = source._optionalCord + _optionalBytesCord = source._optionalBytesCord _optionalPublicImportMessage = source._optionalPublicImportMessage _optionalLazyMessage = source._optionalLazyMessage _optionalUnverifiedLazyMessage = source._optionalUnverifiedLazyMessage @@ -1090,6 +1098,7 @@ extension Proto3ArenaUnittest_TestAllTypes: SwiftProtobuf.Message, SwiftProtobuf case 54: try { try decoder.decodeRepeatedStringField(value: &_storage._repeatedStringPiece) }() case 55: try { try decoder.decodeRepeatedStringField(value: &_storage._repeatedCord) }() case 57: try { try decoder.decodeRepeatedMessageField(value: &_storage._repeatedLazyMessage) }() + case 86: try { try decoder.decodeSingularBytesField(value: &_storage._optionalBytesCord) }() case 111: try { var v: UInt32? try decoder.decodeSingularUInt32Field(value: &v) @@ -1299,6 +1308,9 @@ extension Proto3ArenaUnittest_TestAllTypes: SwiftProtobuf.Message, SwiftProtobuf if !_storage._repeatedLazyMessage.isEmpty { try visitor.visitRepeatedMessageField(value: _storage._repeatedLazyMessage, fieldNumber: 57) } + if !_storage._optionalBytesCord.isEmpty { + try visitor.visitSingularBytesField(value: _storage._optionalBytesCord, fieldNumber: 86) + } switch _storage._oneofField { case .oneofUint32?: try { guard case .oneofUint32(let v)? = _storage._oneofField else { preconditionFailure() } @@ -1397,6 +1409,7 @@ extension Proto3ArenaUnittest_TestAllTypes: SwiftProtobuf.Message, SwiftProtobuf if _storage._optionalForeignEnum != rhs_storage._optionalForeignEnum {return false} if _storage._optionalStringPiece != rhs_storage._optionalStringPiece {return false} if _storage._optionalCord != rhs_storage._optionalCord {return false} + if _storage._optionalBytesCord != rhs_storage._optionalBytesCord {return false} if _storage._optionalPublicImportMessage != rhs_storage._optionalPublicImportMessage {return false} if _storage._optionalLazyMessage != rhs_storage._optionalLazyMessage {return false} if _storage._optionalUnverifiedLazyMessage != rhs_storage._optionalUnverifiedLazyMessage {return false} diff --git a/Sources/SwiftProtobuf/api.pb.swift b/Sources/SwiftProtobuf/api.pb.swift index b79486d6a..a3ebd8a57 100644 --- a/Sources/SwiftProtobuf/api.pb.swift +++ b/Sources/SwiftProtobuf/api.pb.swift @@ -198,7 +198,7 @@ public struct Google_Protobuf_Method: Sendable { /// The mixin construct implies that all methods in `AccessControl` are /// also declared with same name and request/response types in /// `Storage`. A documentation generator or annotation processor will -/// see the effective `Storage.GetAcl` method after inherting +/// see the effective `Storage.GetAcl` method after inheriting /// documentation and annotations as follows: /// /// service Storage { diff --git a/Sources/SwiftProtobuf/descriptor.pb.swift b/Sources/SwiftProtobuf/descriptor.pb.swift index 141ff55f0..a2a0cc35c 100644 --- a/Sources/SwiftProtobuf/descriptor.pb.swift +++ b/Sources/SwiftProtobuf/descriptor.pb.swift @@ -84,7 +84,7 @@ public enum Google_Protobuf_Edition: Enum, Swift.CaseIterable { case edition2024 // = 1001 /// Placeholder editions for testing feature resolution. These should not be - /// used or relyed on outside of tests. + /// used or relied on outside of tests. case edition1TestOnly // = 1 case edition2TestOnly // = 2 case edition99997TestOnly // = 99997