mirror of
https://github.com/apple/swift-protobuf.git
synced 2026-05-17 10:20:36 +00:00
64 lines
1.9 KiB
Swift
64 lines
1.9 KiB
Swift
/*
|
|
* DO NOT EDIT.
|
|
*
|
|
* Generated by the protocol buffer compiler.
|
|
* Source: google/protobuf/source_context.proto
|
|
*
|
|
*/
|
|
|
|
|
|
|
|
|
|
/// `SourceContext` represents information about the source of a
|
|
/// protobuf element, like the file in which it is defined.
|
|
public struct Google_Protobuf_SourceContext: ProtobufGeneratedMessage {
|
|
public var swiftClassName: String {return "Google_Protobuf_SourceContext"}
|
|
public var protoMessageName: String {return "SourceContext"}
|
|
public var protoPackageName: String {return "google.protobuf"}
|
|
public var jsonFieldNames: [String: Int] {return [
|
|
"fileName": 1,
|
|
]}
|
|
public var protoFieldNames: [String: Int] {return [
|
|
"file_name": 1,
|
|
]}
|
|
|
|
/// The path-qualified name of the .proto file that contained the associated
|
|
/// protobuf element. For example: `"google/protobuf/source_context.proto"`.
|
|
public var fileName: String = ""
|
|
|
|
public init() {}
|
|
|
|
public init(fileName: String? = nil)
|
|
{
|
|
if let v = fileName {
|
|
self.fileName = v
|
|
}
|
|
}
|
|
|
|
public mutating func _protoc_generated_decodeField(setter: inout ProtobufFieldDecoder, protoFieldNumber: Int) throws -> Bool {
|
|
let handled: Bool
|
|
switch protoFieldNumber {
|
|
case 1: handled = try setter.decodeSingularField(fieldType: ProtobufString.self, value: &fileName)
|
|
default:
|
|
handled = false
|
|
}
|
|
return handled
|
|
}
|
|
|
|
public func _protoc_generated_traverse(visitor: inout ProtobufVisitor) throws {
|
|
if fileName != "" {
|
|
try visitor.visitSingularField(fieldType: ProtobufString.self, value: fileName, protoFieldNumber: 1, protoFieldName: "file_name", jsonFieldName: "fileName", swiftFieldName: "fileName")
|
|
}
|
|
}
|
|
|
|
public var _protoc_generated_isEmpty: Bool {
|
|
if fileName != "" {return false}
|
|
return true
|
|
}
|
|
|
|
public func _protoc_generated_isEqualTo(other: Google_Protobuf_SourceContext) -> Bool {
|
|
if fileName != other.fileName {return false}
|
|
return true
|
|
}
|
|
}
|