Skip to content

Commit 370d97e

Browse files
authored
Rename some public APIs regarding serialization/parsing. (apple#276)
* Rename some public serialization/parsing APIs on Message. * Regenerate tests. * More source changes. * Update reference protos. * Add "unknownFields" to reserved word lists for types and fields. * Regenerate reference protos again.
1 parent 11b7983 commit 370d97e

File tree

118 files changed

+3920
-3923
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+3920
-3923
lines changed

Reference/google/protobuf/compiler/plugin.pb.swift

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ struct Google_Protobuf_Compiler_Version: SwiftProtobuf.Message, SwiftProtobuf.Pr
7676
4: .same(proto: "suffix"),
7777
]
7878

79-
var unknown = SwiftProtobuf.UnknownStorage()
79+
var unknownFields = SwiftProtobuf.UnknownStorage()
8080

8181
private var _major: Int32? = nil
8282
var major: Int32 {
@@ -157,15 +157,15 @@ struct Google_Protobuf_Compiler_Version: SwiftProtobuf.Message, SwiftProtobuf.Pr
157157
if let v = _suffix {
158158
try visitor.visitSingularField(fieldType: SwiftProtobuf.ProtobufString.self, value: v, fieldNumber: 4)
159159
}
160-
unknown.traverse(visitor: visitor)
160+
unknownFields.traverse(visitor: visitor)
161161
}
162162

163163
func _protoc_generated_isEqualTo(other: Google_Protobuf_Compiler_Version) -> Bool {
164164
if _major != other._major {return false}
165165
if _minor != other._minor {return false}
166166
if _patch != other._patch {return false}
167167
if _suffix != other._suffix {return false}
168-
if unknown != other.unknown {return false}
168+
if unknownFields != other.unknownFields {return false}
169169
return true
170170
}
171171
}
@@ -183,7 +183,7 @@ struct Google_Protobuf_Compiler_CodeGeneratorRequest: SwiftProtobuf.Message, Swi
183183

184184
private class _StorageClass {
185185
typealias ExtendedMessage = Google_Protobuf_Compiler_CodeGeneratorRequest
186-
var unknown = SwiftProtobuf.UnknownStorage()
186+
var unknownFields = SwiftProtobuf.UnknownStorage()
187187
var _fileToGenerate: [String] = []
188188
var _parameter: String? = nil
189189
var _protoFile: [Google_Protobuf_FileDescriptorProto] = []
@@ -223,21 +223,21 @@ struct Google_Protobuf_Compiler_CodeGeneratorRequest: SwiftProtobuf.Message, Swi
223223
if !_protoFile.isEmpty {
224224
try visitor.visitRepeatedMessageField(value: _protoFile, fieldNumber: 15)
225225
}
226-
unknown.traverse(visitor: visitor)
226+
unknownFields.traverse(visitor: visitor)
227227
}
228228

229229
func isEqualTo(other: _StorageClass) -> Bool {
230230
if _fileToGenerate != other._fileToGenerate {return false}
231231
if _parameter != other._parameter {return false}
232232
if _protoFile != other._protoFile {return false}
233233
if _compilerVersion != other._compilerVersion {return false}
234-
if unknown != other.unknown {return false}
234+
if unknownFields != other.unknownFields {return false}
235235
return true
236236
}
237237

238238
func copy() -> _StorageClass {
239239
let clone = _StorageClass()
240-
clone.unknown = unknown
240+
clone.unknownFields = unknownFields
241241
clone._fileToGenerate = _fileToGenerate
242242
clone._parameter = _parameter
243243
clone._protoFile = _protoFile
@@ -248,9 +248,9 @@ struct Google_Protobuf_Compiler_CodeGeneratorRequest: SwiftProtobuf.Message, Swi
248248

249249
private var _storage = _StorageClass()
250250

251-
var unknown: SwiftProtobuf.UnknownStorage {
252-
get {return _storage.unknown}
253-
set {_storage.unknown = newValue}
251+
var unknownFields: SwiftProtobuf.UnknownStorage {
252+
get {return _storage.unknownFields}
253+
set {_storage.unknownFields = newValue}
254254
}
255255

256256
/// The .proto files that were explicitly listed on the command-line. The
@@ -338,7 +338,7 @@ struct Google_Protobuf_Compiler_CodeGeneratorResponse: SwiftProtobuf.Message, Sw
338338
15: .same(proto: "file"),
339339
]
340340

341-
var unknown = SwiftProtobuf.UnknownStorage()
341+
var unknownFields = SwiftProtobuf.UnknownStorage()
342342

343343
/// Represents a single generated file.
344344
struct File: SwiftProtobuf.Message, SwiftProtobuf.Proto2Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf.ProtoNameProviding {
@@ -350,7 +350,7 @@ struct Google_Protobuf_Compiler_CodeGeneratorResponse: SwiftProtobuf.Message, Sw
350350
15: .same(proto: "content"),
351351
]
352352

353-
var unknown = SwiftProtobuf.UnknownStorage()
353+
var unknownFields = SwiftProtobuf.UnknownStorage()
354354

355355
/// The file name, relative to the output directory. The name must not
356356
/// contain "." or ".." components and must be relative, not be absolute (so,
@@ -462,14 +462,14 @@ struct Google_Protobuf_Compiler_CodeGeneratorResponse: SwiftProtobuf.Message, Sw
462462
if let v = _content {
463463
try visitor.visitSingularField(fieldType: SwiftProtobuf.ProtobufString.self, value: v, fieldNumber: 15)
464464
}
465-
unknown.traverse(visitor: visitor)
465+
unknownFields.traverse(visitor: visitor)
466466
}
467467

468468
func _protoc_generated_isEqualTo(other: Google_Protobuf_Compiler_CodeGeneratorResponse.File) -> Bool {
469469
if _name != other._name {return false}
470470
if _insertionPoint != other._insertionPoint {return false}
471471
if _content != other._content {return false}
472-
if unknown != other.unknown {return false}
472+
if unknownFields != other.unknownFields {return false}
473473
return true
474474
}
475475
}
@@ -517,13 +517,13 @@ struct Google_Protobuf_Compiler_CodeGeneratorResponse: SwiftProtobuf.Message, Sw
517517
if !file.isEmpty {
518518
try visitor.visitRepeatedMessageField(value: file, fieldNumber: 15)
519519
}
520-
unknown.traverse(visitor: visitor)
520+
unknownFields.traverse(visitor: visitor)
521521
}
522522

523523
func _protoc_generated_isEqualTo(other: Google_Protobuf_Compiler_CodeGeneratorResponse) -> Bool {
524524
if _error != other._error {return false}
525525
if file != other.file {return false}
526-
if unknown != other.unknown {return false}
526+
if unknownFields != other.unknownFields {return false}
527527
return true
528528
}
529529
}

0 commit comments

Comments
 (0)