mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
105 lines
3.9 KiB
Swift
105 lines
3.9 KiB
Swift
// DO NOT EDIT.
|
|
// swift-format-ignore-file
|
|
//
|
|
// Generated by the Swift generator plugin for the protocol buffer compiler.
|
|
// Source: cannedmessages.proto
|
|
//
|
|
// For information on using the generated types, please see the documentation:
|
|
// https://github.com/apple/swift-protobuf/
|
|
|
|
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 you 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
|
|
}
|
|
|
|
///
|
|
/// Canned message module configuration.
|
|
struct CannedMessageModuleConfig {
|
|
// 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.
|
|
|
|
///
|
|
/// Predefined messages for canned message module separated by '|' characters.
|
|
var messagesPart1: String = String()
|
|
|
|
///
|
|
/// TODO: REPLACE
|
|
var messagesPart2: String = String()
|
|
|
|
///
|
|
/// TODO: REPLACE
|
|
var messagesPart3: String = String()
|
|
|
|
///
|
|
/// TODO: REPLACE
|
|
var messagesPart4: String = String()
|
|
|
|
var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
|
|
init() {}
|
|
}
|
|
|
|
#if swift(>=5.5) && canImport(_Concurrency)
|
|
extension CannedMessageModuleConfig: @unchecked Sendable {}
|
|
#endif // swift(>=5.5) && canImport(_Concurrency)
|
|
|
|
// MARK: - Code below here is support for the SwiftProtobuf runtime.
|
|
|
|
extension CannedMessageModuleConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
static let protoMessageName: String = "CannedMessageModuleConfig"
|
|
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
|
11: .same(proto: "messagesPart1"),
|
|
12: .same(proto: "messagesPart2"),
|
|
13: .same(proto: "messagesPart3"),
|
|
14: .same(proto: "messagesPart4"),
|
|
]
|
|
|
|
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(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 11: try { try decoder.decodeSingularStringField(value: &self.messagesPart1) }()
|
|
case 12: try { try decoder.decodeSingularStringField(value: &self.messagesPart2) }()
|
|
case 13: try { try decoder.decodeSingularStringField(value: &self.messagesPart3) }()
|
|
case 14: try { try decoder.decodeSingularStringField(value: &self.messagesPart4) }()
|
|
default: break
|
|
}
|
|
}
|
|
}
|
|
|
|
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
if !self.messagesPart1.isEmpty {
|
|
try visitor.visitSingularStringField(value: self.messagesPart1, fieldNumber: 11)
|
|
}
|
|
if !self.messagesPart2.isEmpty {
|
|
try visitor.visitSingularStringField(value: self.messagesPart2, fieldNumber: 12)
|
|
}
|
|
if !self.messagesPart3.isEmpty {
|
|
try visitor.visitSingularStringField(value: self.messagesPart3, fieldNumber: 13)
|
|
}
|
|
if !self.messagesPart4.isEmpty {
|
|
try visitor.visitSingularStringField(value: self.messagesPart4, fieldNumber: 14)
|
|
}
|
|
try unknownFields.traverse(visitor: &visitor)
|
|
}
|
|
|
|
static func ==(lhs: CannedMessageModuleConfig, rhs: CannedMessageModuleConfig) -> Bool {
|
|
if lhs.messagesPart1 != rhs.messagesPart1 {return false}
|
|
if lhs.messagesPart2 != rhs.messagesPart2 {return false}
|
|
if lhs.messagesPart3 != rhs.messagesPart3 {return false}
|
|
if lhs.messagesPart4 != rhs.messagesPart4 {return false}
|
|
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
return true
|
|
}
|
|
}
|