1837 lines
67 KiB
Swift
1837 lines
67 KiB
Swift
// DO NOT EDIT.
|
||
// swift-format-ignore-file
|
||
// swiftlint:disable all
|
||
//
|
||
// Generated by the Swift generator plugin for the protocol buffer compiler.
|
||
// Source: sdlan_pb.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
|
||
}
|
||
|
||
struct SDLV4Info: @unchecked 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 port: UInt32 = 0
|
||
|
||
var v4: Data = Data()
|
||
|
||
var natType: UInt32 = 0
|
||
|
||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||
|
||
init() {}
|
||
}
|
||
|
||
struct SDLV6Info: @unchecked 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 port: UInt32 = 0
|
||
|
||
var v6: Data = Data()
|
||
|
||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||
|
||
init() {}
|
||
}
|
||
|
||
struct SDLWelcome: 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 version: UInt32 = 0
|
||
|
||
/// 服务器允许的最大双向流
|
||
var maxBidiStreams: UInt32 = 0
|
||
|
||
/// 服务器允许的最大包
|
||
var maxPacketSize: UInt32 = 0
|
||
|
||
/// 心跳包的间隔
|
||
var heartbeatSec: UInt32 = 0
|
||
|
||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||
|
||
init() {}
|
||
}
|
||
|
||
/// 这里修改成了扁平的结构, 否则有些字段不好找放的位置
|
||
struct SDLRegisterSuper: @unchecked 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 clientID: String = String()
|
||
|
||
/// 网络地址信息已经有https请求分配了
|
||
/// 注册的时候需要带上(network_id, mac, ip, mask_len, hostname)
|
||
var networkID: UInt32 = 0
|
||
|
||
var mac: Data = Data()
|
||
|
||
var ip: UInt32 = 0
|
||
|
||
var maskLen: UInt32 = 0
|
||
|
||
var hostname: String = String()
|
||
|
||
var pubKey: String = String()
|
||
|
||
/// 客户端使用http协议请求后端,通过token或者账号密码登录时, 统一返回一个access_token;
|
||
/// RegisterSuper的时候,验证凭证是否合法 (access_token)
|
||
var accessToken: String = String()
|
||
|
||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||
|
||
init() {}
|
||
}
|
||
|
||
/// 客户端的升级逻辑,在https的接口里面去完成
|
||
/// 部分逻辑会脱离quic去通讯,增加session_token校验
|
||
struct SDLRegisterSuperAck: @unchecked 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.
|
||
|
||
/// 目前支持aes, chacha20
|
||
var algorithm: String = String()
|
||
|
||
var key: Data = Data()
|
||
|
||
/// 逻辑分段,chacha20加密算法需要使用该字段
|
||
var regionID: UInt32 = 0
|
||
|
||
var sessionToken: Data = Data()
|
||
|
||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||
|
||
init() {}
|
||
}
|
||
|
||
struct SDLRegisterSuperNak: 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 errorCode: UInt32 = 0
|
||
|
||
var errorMessage: String = String()
|
||
|
||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||
|
||
init() {}
|
||
}
|
||
|
||
/// 网络地址查询
|
||
struct SDLQueryInfo: @unchecked 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 dstMac: Data = Data()
|
||
|
||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||
|
||
init() {}
|
||
}
|
||
|
||
struct SDLPeerInfo: @unchecked 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 dstMac: Data = Data()
|
||
|
||
var v4Info: SDLV4Info {
|
||
get {return _v4Info ?? SDLV4Info()}
|
||
set {_v4Info = newValue}
|
||
}
|
||
/// Returns true if `v4Info` has been explicitly set.
|
||
var hasV4Info: Bool {return self._v4Info != nil}
|
||
/// Clears the value of `v4Info`. Subsequent reads from it will return its default value.
|
||
mutating func clearV4Info() {self._v4Info = nil}
|
||
|
||
var v6Info: SDLV6Info {
|
||
get {return _v6Info ?? SDLV6Info()}
|
||
set {_v6Info = newValue}
|
||
}
|
||
/// Returns true if `v6Info` has been explicitly set.
|
||
var hasV6Info: Bool {return self._v6Info != nil}
|
||
/// Clears the value of `v6Info`. Subsequent reads from it will return its default value.
|
||
mutating func clearV6Info() {self._v6Info = nil}
|
||
|
||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||
|
||
init() {}
|
||
|
||
fileprivate var _v4Info: SDLV4Info? = nil
|
||
fileprivate var _v6Info: SDLV6Info? = nil
|
||
}
|
||
|
||
/// ARP查询相关
|
||
/// 真实的arp请求是通过广播的形式获取到的,但是针对于macos这种tun的实现;是能够分析出arp请求包的;
|
||
/// 对于当前网络来说,服务端是知道mac对应的ip地址的,因此没有必要广播;直接通过服务器端返回
|
||
struct SDLArpRequest: @unchecked 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 targetIp: UInt32 = 0
|
||
|
||
var originIp: UInt32 = 0
|
||
|
||
var context: Data = Data()
|
||
|
||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||
|
||
init() {}
|
||
}
|
||
|
||
struct SDLArpResponse: @unchecked 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 targetIp: UInt32 = 0
|
||
|
||
var targetMac: Data = Data()
|
||
|
||
var originIp: UInt32 = 0
|
||
|
||
var context: Data = Data()
|
||
|
||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||
|
||
init() {}
|
||
}
|
||
|
||
/// 权限请求查询相关
|
||
struct SDLPolicyRequest: 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 srcIdentityID: UInt32 = 0
|
||
|
||
var dstIdentityID: UInt32 = 0
|
||
|
||
var version: UInt32 = 0
|
||
|
||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||
|
||
init() {}
|
||
}
|
||
|
||
/// 基于quic通讯,rules部分已经没有了长度限制
|
||
struct SDLPolicyResponse: @unchecked 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 srcIdentityID: UInt32 = 0
|
||
|
||
var dstIdentityID: UInt32 = 0
|
||
|
||
/// 版本号,客户端需要比较版本号确定是否覆盖; 请求端自己去管理版本号,服务端只是原样回写
|
||
var version: UInt32 = 0
|
||
|
||
/// 1 + 2稀疏序列化规则, 按照: <<Proto:8, Port:16>> 这个格式序列号所有的规则信息; 下发的数据默认都是allow,deny规则的服务器端已经屏蔽
|
||
var rules: Data = Data()
|
||
|
||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||
|
||
init() {}
|
||
}
|
||
|
||
struct SDLEvent: 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 event: SDLEvent.OneOf_Event? = nil
|
||
|
||
var natChanged: SDLEvent.NatChanged {
|
||
get {
|
||
if case .natChanged(let v)? = event {return v}
|
||
return SDLEvent.NatChanged()
|
||
}
|
||
set {event = .natChanged(newValue)}
|
||
}
|
||
|
||
var sendRegister: SDLEvent.SendRegister {
|
||
get {
|
||
if case .sendRegister(let v)? = event {return v}
|
||
return SDLEvent.SendRegister()
|
||
}
|
||
set {event = .sendRegister(newValue)}
|
||
}
|
||
|
||
var shutdown: SDLEvent.NetworkShutdown {
|
||
get {
|
||
if case .shutdown(let v)? = event {return v}
|
||
return SDLEvent.NetworkShutdown()
|
||
}
|
||
set {event = .shutdown(newValue)}
|
||
}
|
||
|
||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||
|
||
enum OneOf_Event: Equatable, Sendable {
|
||
case natChanged(SDLEvent.NatChanged)
|
||
case sendRegister(SDLEvent.SendRegister)
|
||
case shutdown(SDLEvent.NetworkShutdown)
|
||
|
||
}
|
||
|
||
/// nat映射变化
|
||
struct NatChanged: @unchecked 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 mac: Data = Data()
|
||
|
||
var ip: UInt32 = 0
|
||
|
||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||
|
||
init() {}
|
||
}
|
||
|
||
/// 发送register消息
|
||
struct SendRegister: @unchecked 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 dstMac: Data = Data()
|
||
|
||
var natIp: UInt32 = 0
|
||
|
||
var natPort: UInt32 = 0
|
||
|
||
var natType: UInt32 = 0
|
||
|
||
var v6Info: SDLV6Info {
|
||
get {return _v6Info ?? SDLV6Info()}
|
||
set {_v6Info = newValue}
|
||
}
|
||
/// Returns true if `v6Info` has been explicitly set.
|
||
var hasV6Info: Bool {return self._v6Info != nil}
|
||
/// Clears the value of `v6Info`. Subsequent reads from it will return its default value.
|
||
mutating func clearV6Info() {self._v6Info = nil}
|
||
|
||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||
|
||
init() {}
|
||
|
||
fileprivate var _v6Info: SDLV6Info? = nil
|
||
}
|
||
|
||
/// 网络关闭
|
||
struct NetworkShutdown: 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 message: String = String()
|
||
|
||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||
|
||
init() {}
|
||
}
|
||
|
||
init() {}
|
||
}
|
||
|
||
/// Command指令
|
||
struct SDLCommand: 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 pktID: UInt32 = 0
|
||
|
||
var command: SDLCommand.OneOf_Command? = nil
|
||
|
||
var exitNode: SDLCommand.ExitNodeControl {
|
||
get {
|
||
if case .exitNode(let v)? = command {return v}
|
||
return SDLCommand.ExitNodeControl()
|
||
}
|
||
set {command = .exitNode(newValue)}
|
||
}
|
||
|
||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||
|
||
enum OneOf_Command: Equatable, Sendable {
|
||
case exitNode(SDLCommand.ExitNodeControl)
|
||
|
||
}
|
||
|
||
/// 出口节点控制
|
||
struct ExitNodeControl: 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 action: Int32 = 0
|
||
|
||
/// 可选:备注(方便日志/调试)
|
||
var remark: String = String()
|
||
|
||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||
|
||
init() {}
|
||
}
|
||
|
||
init() {}
|
||
}
|
||
|
||
struct SDLCommandAck: @unchecked 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 pktID: UInt32 = 0
|
||
|
||
var code: Int32 = 0
|
||
|
||
var message: String = String()
|
||
|
||
var data: Data = Data()
|
||
|
||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||
|
||
init() {}
|
||
}
|
||
|
||
/// client和stun之间的心跳包,客户端需要和super的udp之间的存活逻辑
|
||
struct SDLStunRequest: @unchecked 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 clientID: String = String()
|
||
|
||
var networkID: UInt32 = 0
|
||
|
||
var mac: Data = Data()
|
||
|
||
var ip: UInt32 = 0
|
||
|
||
var natType: UInt32 = 0
|
||
|
||
var v6Info: SDLV6Info {
|
||
get {return _v6Info ?? SDLV6Info()}
|
||
set {_v6Info = newValue}
|
||
}
|
||
/// Returns true if `v6Info` has been explicitly set.
|
||
var hasV6Info: Bool {return self._v6Info != nil}
|
||
/// Clears the value of `v6Info`. Subsequent reads from it will return its default value.
|
||
mutating func clearV6Info() {self._v6Info = nil}
|
||
|
||
var sessionToken: Data = Data()
|
||
|
||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||
|
||
init() {}
|
||
|
||
fileprivate var _v6Info: SDLV6Info? = nil
|
||
}
|
||
|
||
struct SDLStunReply: 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 unknownFields = SwiftProtobuf.UnknownStorage()
|
||
|
||
init() {}
|
||
}
|
||
|
||
struct SDLData: @unchecked 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 networkID: UInt32 = 0
|
||
|
||
var srcMac: Data = Data()
|
||
|
||
var dstMac: Data = Data()
|
||
|
||
var isP2P: Bool = false
|
||
|
||
var ttl: UInt32 = 0
|
||
|
||
var data: Data = Data()
|
||
|
||
var sessionToken: Data = Data()
|
||
|
||
/// 端通过https登录的时候,服务端会分配该端对应的权限标识
|
||
/// 后续的请求过程中需要带上这个值,对端通过这个值要判断对数据包是否放行
|
||
var identityID: UInt32 = 0
|
||
|
||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||
|
||
init() {}
|
||
}
|
||
|
||
struct SDLStunProbe: 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 cookie: UInt32 = 0
|
||
|
||
var attr: UInt32 = 0
|
||
|
||
/// 增加step是为了方便端上判断,收到的请求和响应之间的映射关系;服务器端原样返回
|
||
var step: UInt32 = 0
|
||
|
||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||
|
||
init() {}
|
||
}
|
||
|
||
struct SDLStunProbeReply: 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 cookie: UInt32 = 0
|
||
|
||
/// 增加step是为了方便端上判断,收到的请求和响应之间的映射关系;服务器端原样返回
|
||
var step: UInt32 = 0
|
||
|
||
var port: UInt32 = 0
|
||
|
||
var ip: UInt32 = 0
|
||
|
||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||
|
||
init() {}
|
||
}
|
||
|
||
struct SDLRegister: @unchecked 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 networkID: UInt32 = 0
|
||
|
||
var srcMac: Data = Data()
|
||
|
||
var dstMac: Data = Data()
|
||
|
||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||
|
||
init() {}
|
||
}
|
||
|
||
struct SDLRegisterAck: @unchecked 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 networkID: UInt32 = 0
|
||
|
||
var srcMac: Data = Data()
|
||
|
||
var dstMac: Data = Data()
|
||
|
||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||
|
||
init() {}
|
||
}
|
||
|
||
// MARK: - Code below here is support for the SwiftProtobuf runtime.
|
||
|
||
extension SDLV4Info: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||
static let protoMessageName: String = "SDLV4Info"
|
||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||
1: .same(proto: "port"),
|
||
2: .same(proto: "v4"),
|
||
3: .standard(proto: "nat_type"),
|
||
]
|
||
|
||
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 1: try { try decoder.decodeSingularUInt32Field(value: &self.port) }()
|
||
case 2: try { try decoder.decodeSingularBytesField(value: &self.v4) }()
|
||
case 3: try { try decoder.decodeSingularUInt32Field(value: &self.natType) }()
|
||
default: break
|
||
}
|
||
}
|
||
}
|
||
|
||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||
if self.port != 0 {
|
||
try visitor.visitSingularUInt32Field(value: self.port, fieldNumber: 1)
|
||
}
|
||
if !self.v4.isEmpty {
|
||
try visitor.visitSingularBytesField(value: self.v4, fieldNumber: 2)
|
||
}
|
||
if self.natType != 0 {
|
||
try visitor.visitSingularUInt32Field(value: self.natType, fieldNumber: 3)
|
||
}
|
||
try unknownFields.traverse(visitor: &visitor)
|
||
}
|
||
|
||
static func ==(lhs: SDLV4Info, rhs: SDLV4Info) -> Bool {
|
||
if lhs.port != rhs.port {return false}
|
||
if lhs.v4 != rhs.v4 {return false}
|
||
if lhs.natType != rhs.natType {return false}
|
||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||
return true
|
||
}
|
||
}
|
||
|
||
extension SDLV6Info: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||
static let protoMessageName: String = "SDLV6Info"
|
||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||
1: .same(proto: "port"),
|
||
2: .same(proto: "v6"),
|
||
]
|
||
|
||
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 1: try { try decoder.decodeSingularUInt32Field(value: &self.port) }()
|
||
case 2: try { try decoder.decodeSingularBytesField(value: &self.v6) }()
|
||
default: break
|
||
}
|
||
}
|
||
}
|
||
|
||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||
if self.port != 0 {
|
||
try visitor.visitSingularUInt32Field(value: self.port, fieldNumber: 1)
|
||
}
|
||
if !self.v6.isEmpty {
|
||
try visitor.visitSingularBytesField(value: self.v6, fieldNumber: 2)
|
||
}
|
||
try unknownFields.traverse(visitor: &visitor)
|
||
}
|
||
|
||
static func ==(lhs: SDLV6Info, rhs: SDLV6Info) -> Bool {
|
||
if lhs.port != rhs.port {return false}
|
||
if lhs.v6 != rhs.v6 {return false}
|
||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||
return true
|
||
}
|
||
}
|
||
|
||
extension SDLWelcome: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||
static let protoMessageName: String = "SDLWelcome"
|
||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||
1: .same(proto: "version"),
|
||
2: .standard(proto: "max_bidi_streams"),
|
||
3: .standard(proto: "max_packet_size"),
|
||
4: .standard(proto: "heartbeat_sec"),
|
||
]
|
||
|
||
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 1: try { try decoder.decodeSingularUInt32Field(value: &self.version) }()
|
||
case 2: try { try decoder.decodeSingularUInt32Field(value: &self.maxBidiStreams) }()
|
||
case 3: try { try decoder.decodeSingularUInt32Field(value: &self.maxPacketSize) }()
|
||
case 4: try { try decoder.decodeSingularUInt32Field(value: &self.heartbeatSec) }()
|
||
default: break
|
||
}
|
||
}
|
||
}
|
||
|
||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||
if self.version != 0 {
|
||
try visitor.visitSingularUInt32Field(value: self.version, fieldNumber: 1)
|
||
}
|
||
if self.maxBidiStreams != 0 {
|
||
try visitor.visitSingularUInt32Field(value: self.maxBidiStreams, fieldNumber: 2)
|
||
}
|
||
if self.maxPacketSize != 0 {
|
||
try visitor.visitSingularUInt32Field(value: self.maxPacketSize, fieldNumber: 3)
|
||
}
|
||
if self.heartbeatSec != 0 {
|
||
try visitor.visitSingularUInt32Field(value: self.heartbeatSec, fieldNumber: 4)
|
||
}
|
||
try unknownFields.traverse(visitor: &visitor)
|
||
}
|
||
|
||
static func ==(lhs: SDLWelcome, rhs: SDLWelcome) -> Bool {
|
||
if lhs.version != rhs.version {return false}
|
||
if lhs.maxBidiStreams != rhs.maxBidiStreams {return false}
|
||
if lhs.maxPacketSize != rhs.maxPacketSize {return false}
|
||
if lhs.heartbeatSec != rhs.heartbeatSec {return false}
|
||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||
return true
|
||
}
|
||
}
|
||
|
||
extension SDLRegisterSuper: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||
static let protoMessageName: String = "SDLRegisterSuper"
|
||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||
1: .standard(proto: "client_id"),
|
||
2: .standard(proto: "network_id"),
|
||
3: .same(proto: "mac"),
|
||
4: .same(proto: "ip"),
|
||
5: .standard(proto: "mask_len"),
|
||
6: .same(proto: "hostname"),
|
||
7: .standard(proto: "pub_key"),
|
||
8: .standard(proto: "access_token"),
|
||
]
|
||
|
||
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 1: try { try decoder.decodeSingularStringField(value: &self.clientID) }()
|
||
case 2: try { try decoder.decodeSingularUInt32Field(value: &self.networkID) }()
|
||
case 3: try { try decoder.decodeSingularBytesField(value: &self.mac) }()
|
||
case 4: try { try decoder.decodeSingularUInt32Field(value: &self.ip) }()
|
||
case 5: try { try decoder.decodeSingularUInt32Field(value: &self.maskLen) }()
|
||
case 6: try { try decoder.decodeSingularStringField(value: &self.hostname) }()
|
||
case 7: try { try decoder.decodeSingularStringField(value: &self.pubKey) }()
|
||
case 8: try { try decoder.decodeSingularStringField(value: &self.accessToken) }()
|
||
default: break
|
||
}
|
||
}
|
||
}
|
||
|
||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||
if !self.clientID.isEmpty {
|
||
try visitor.visitSingularStringField(value: self.clientID, fieldNumber: 1)
|
||
}
|
||
if self.networkID != 0 {
|
||
try visitor.visitSingularUInt32Field(value: self.networkID, fieldNumber: 2)
|
||
}
|
||
if !self.mac.isEmpty {
|
||
try visitor.visitSingularBytesField(value: self.mac, fieldNumber: 3)
|
||
}
|
||
if self.ip != 0 {
|
||
try visitor.visitSingularUInt32Field(value: self.ip, fieldNumber: 4)
|
||
}
|
||
if self.maskLen != 0 {
|
||
try visitor.visitSingularUInt32Field(value: self.maskLen, fieldNumber: 5)
|
||
}
|
||
if !self.hostname.isEmpty {
|
||
try visitor.visitSingularStringField(value: self.hostname, fieldNumber: 6)
|
||
}
|
||
if !self.pubKey.isEmpty {
|
||
try visitor.visitSingularStringField(value: self.pubKey, fieldNumber: 7)
|
||
}
|
||
if !self.accessToken.isEmpty {
|
||
try visitor.visitSingularStringField(value: self.accessToken, fieldNumber: 8)
|
||
}
|
||
try unknownFields.traverse(visitor: &visitor)
|
||
}
|
||
|
||
static func ==(lhs: SDLRegisterSuper, rhs: SDLRegisterSuper) -> Bool {
|
||
if lhs.clientID != rhs.clientID {return false}
|
||
if lhs.networkID != rhs.networkID {return false}
|
||
if lhs.mac != rhs.mac {return false}
|
||
if lhs.ip != rhs.ip {return false}
|
||
if lhs.maskLen != rhs.maskLen {return false}
|
||
if lhs.hostname != rhs.hostname {return false}
|
||
if lhs.pubKey != rhs.pubKey {return false}
|
||
if lhs.accessToken != rhs.accessToken {return false}
|
||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||
return true
|
||
}
|
||
}
|
||
|
||
extension SDLRegisterSuperAck: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||
static let protoMessageName: String = "SDLRegisterSuperAck"
|
||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||
1: .same(proto: "algorithm"),
|
||
2: .same(proto: "key"),
|
||
3: .standard(proto: "region_id"),
|
||
4: .standard(proto: "session_token"),
|
||
]
|
||
|
||
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 1: try { try decoder.decodeSingularStringField(value: &self.algorithm) }()
|
||
case 2: try { try decoder.decodeSingularBytesField(value: &self.key) }()
|
||
case 3: try { try decoder.decodeSingularUInt32Field(value: &self.regionID) }()
|
||
case 4: try { try decoder.decodeSingularBytesField(value: &self.sessionToken) }()
|
||
default: break
|
||
}
|
||
}
|
||
}
|
||
|
||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||
if !self.algorithm.isEmpty {
|
||
try visitor.visitSingularStringField(value: self.algorithm, fieldNumber: 1)
|
||
}
|
||
if !self.key.isEmpty {
|
||
try visitor.visitSingularBytesField(value: self.key, fieldNumber: 2)
|
||
}
|
||
if self.regionID != 0 {
|
||
try visitor.visitSingularUInt32Field(value: self.regionID, fieldNumber: 3)
|
||
}
|
||
if !self.sessionToken.isEmpty {
|
||
try visitor.visitSingularBytesField(value: self.sessionToken, fieldNumber: 4)
|
||
}
|
||
try unknownFields.traverse(visitor: &visitor)
|
||
}
|
||
|
||
static func ==(lhs: SDLRegisterSuperAck, rhs: SDLRegisterSuperAck) -> Bool {
|
||
if lhs.algorithm != rhs.algorithm {return false}
|
||
if lhs.key != rhs.key {return false}
|
||
if lhs.regionID != rhs.regionID {return false}
|
||
if lhs.sessionToken != rhs.sessionToken {return false}
|
||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||
return true
|
||
}
|
||
}
|
||
|
||
extension SDLRegisterSuperNak: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||
static let protoMessageName: String = "SDLRegisterSuperNak"
|
||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||
1: .standard(proto: "error_code"),
|
||
2: .standard(proto: "error_message"),
|
||
]
|
||
|
||
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 1: try { try decoder.decodeSingularUInt32Field(value: &self.errorCode) }()
|
||
case 2: try { try decoder.decodeSingularStringField(value: &self.errorMessage) }()
|
||
default: break
|
||
}
|
||
}
|
||
}
|
||
|
||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||
if self.errorCode != 0 {
|
||
try visitor.visitSingularUInt32Field(value: self.errorCode, fieldNumber: 1)
|
||
}
|
||
if !self.errorMessage.isEmpty {
|
||
try visitor.visitSingularStringField(value: self.errorMessage, fieldNumber: 2)
|
||
}
|
||
try unknownFields.traverse(visitor: &visitor)
|
||
}
|
||
|
||
static func ==(lhs: SDLRegisterSuperNak, rhs: SDLRegisterSuperNak) -> Bool {
|
||
if lhs.errorCode != rhs.errorCode {return false}
|
||
if lhs.errorMessage != rhs.errorMessage {return false}
|
||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||
return true
|
||
}
|
||
}
|
||
|
||
extension SDLQueryInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||
static let protoMessageName: String = "SDLQueryInfo"
|
||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||
1: .standard(proto: "dst_mac"),
|
||
]
|
||
|
||
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 1: try { try decoder.decodeSingularBytesField(value: &self.dstMac) }()
|
||
default: break
|
||
}
|
||
}
|
||
}
|
||
|
||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||
if !self.dstMac.isEmpty {
|
||
try visitor.visitSingularBytesField(value: self.dstMac, fieldNumber: 1)
|
||
}
|
||
try unknownFields.traverse(visitor: &visitor)
|
||
}
|
||
|
||
static func ==(lhs: SDLQueryInfo, rhs: SDLQueryInfo) -> Bool {
|
||
if lhs.dstMac != rhs.dstMac {return false}
|
||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||
return true
|
||
}
|
||
}
|
||
|
||
extension SDLPeerInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||
static let protoMessageName: String = "SDLPeerInfo"
|
||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||
1: .standard(proto: "dst_mac"),
|
||
2: .standard(proto: "v4_info"),
|
||
3: .standard(proto: "v6_info"),
|
||
]
|
||
|
||
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 1: try { try decoder.decodeSingularBytesField(value: &self.dstMac) }()
|
||
case 2: try { try decoder.decodeSingularMessageField(value: &self._v4Info) }()
|
||
case 3: try { try decoder.decodeSingularMessageField(value: &self._v6Info) }()
|
||
default: break
|
||
}
|
||
}
|
||
}
|
||
|
||
func traverse<V: SwiftProtobuf.Visitor>(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
|
||
if !self.dstMac.isEmpty {
|
||
try visitor.visitSingularBytesField(value: self.dstMac, fieldNumber: 1)
|
||
}
|
||
try { if let v = self._v4Info {
|
||
try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
|
||
} }()
|
||
try { if let v = self._v6Info {
|
||
try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
|
||
} }()
|
||
try unknownFields.traverse(visitor: &visitor)
|
||
}
|
||
|
||
static func ==(lhs: SDLPeerInfo, rhs: SDLPeerInfo) -> Bool {
|
||
if lhs.dstMac != rhs.dstMac {return false}
|
||
if lhs._v4Info != rhs._v4Info {return false}
|
||
if lhs._v6Info != rhs._v6Info {return false}
|
||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||
return true
|
||
}
|
||
}
|
||
|
||
extension SDLArpRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||
static let protoMessageName: String = "SDLArpRequest"
|
||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||
1: .standard(proto: "target_ip"),
|
||
2: .standard(proto: "origin_ip"),
|
||
3: .same(proto: "context"),
|
||
]
|
||
|
||
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 1: try { try decoder.decodeSingularUInt32Field(value: &self.targetIp) }()
|
||
case 2: try { try decoder.decodeSingularUInt32Field(value: &self.originIp) }()
|
||
case 3: try { try decoder.decodeSingularBytesField(value: &self.context) }()
|
||
default: break
|
||
}
|
||
}
|
||
}
|
||
|
||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||
if self.targetIp != 0 {
|
||
try visitor.visitSingularUInt32Field(value: self.targetIp, fieldNumber: 1)
|
||
}
|
||
if self.originIp != 0 {
|
||
try visitor.visitSingularUInt32Field(value: self.originIp, fieldNumber: 2)
|
||
}
|
||
if !self.context.isEmpty {
|
||
try visitor.visitSingularBytesField(value: self.context, fieldNumber: 3)
|
||
}
|
||
try unknownFields.traverse(visitor: &visitor)
|
||
}
|
||
|
||
static func ==(lhs: SDLArpRequest, rhs: SDLArpRequest) -> Bool {
|
||
if lhs.targetIp != rhs.targetIp {return false}
|
||
if lhs.originIp != rhs.originIp {return false}
|
||
if lhs.context != rhs.context {return false}
|
||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||
return true
|
||
}
|
||
}
|
||
|
||
extension SDLArpResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||
static let protoMessageName: String = "SDLArpResponse"
|
||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||
1: .standard(proto: "target_ip"),
|
||
2: .standard(proto: "target_mac"),
|
||
3: .standard(proto: "origin_ip"),
|
||
4: .same(proto: "context"),
|
||
]
|
||
|
||
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 1: try { try decoder.decodeSingularUInt32Field(value: &self.targetIp) }()
|
||
case 2: try { try decoder.decodeSingularBytesField(value: &self.targetMac) }()
|
||
case 3: try { try decoder.decodeSingularUInt32Field(value: &self.originIp) }()
|
||
case 4: try { try decoder.decodeSingularBytesField(value: &self.context) }()
|
||
default: break
|
||
}
|
||
}
|
||
}
|
||
|
||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||
if self.targetIp != 0 {
|
||
try visitor.visitSingularUInt32Field(value: self.targetIp, fieldNumber: 1)
|
||
}
|
||
if !self.targetMac.isEmpty {
|
||
try visitor.visitSingularBytesField(value: self.targetMac, fieldNumber: 2)
|
||
}
|
||
if self.originIp != 0 {
|
||
try visitor.visitSingularUInt32Field(value: self.originIp, fieldNumber: 3)
|
||
}
|
||
if !self.context.isEmpty {
|
||
try visitor.visitSingularBytesField(value: self.context, fieldNumber: 4)
|
||
}
|
||
try unknownFields.traverse(visitor: &visitor)
|
||
}
|
||
|
||
static func ==(lhs: SDLArpResponse, rhs: SDLArpResponse) -> Bool {
|
||
if lhs.targetIp != rhs.targetIp {return false}
|
||
if lhs.targetMac != rhs.targetMac {return false}
|
||
if lhs.originIp != rhs.originIp {return false}
|
||
if lhs.context != rhs.context {return false}
|
||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||
return true
|
||
}
|
||
}
|
||
|
||
extension SDLPolicyRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||
static let protoMessageName: String = "SDLPolicyRequest"
|
||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||
1: .standard(proto: "src_identity_id"),
|
||
2: .standard(proto: "dst_identity_id"),
|
||
3: .same(proto: "version"),
|
||
]
|
||
|
||
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 1: try { try decoder.decodeSingularUInt32Field(value: &self.srcIdentityID) }()
|
||
case 2: try { try decoder.decodeSingularUInt32Field(value: &self.dstIdentityID) }()
|
||
case 3: try { try decoder.decodeSingularUInt32Field(value: &self.version) }()
|
||
default: break
|
||
}
|
||
}
|
||
}
|
||
|
||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||
if self.srcIdentityID != 0 {
|
||
try visitor.visitSingularUInt32Field(value: self.srcIdentityID, fieldNumber: 1)
|
||
}
|
||
if self.dstIdentityID != 0 {
|
||
try visitor.visitSingularUInt32Field(value: self.dstIdentityID, fieldNumber: 2)
|
||
}
|
||
if self.version != 0 {
|
||
try visitor.visitSingularUInt32Field(value: self.version, fieldNumber: 3)
|
||
}
|
||
try unknownFields.traverse(visitor: &visitor)
|
||
}
|
||
|
||
static func ==(lhs: SDLPolicyRequest, rhs: SDLPolicyRequest) -> Bool {
|
||
if lhs.srcIdentityID != rhs.srcIdentityID {return false}
|
||
if lhs.dstIdentityID != rhs.dstIdentityID {return false}
|
||
if lhs.version != rhs.version {return false}
|
||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||
return true
|
||
}
|
||
}
|
||
|
||
extension SDLPolicyResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||
static let protoMessageName: String = "SDLPolicyResponse"
|
||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||
1: .standard(proto: "src_identity_id"),
|
||
2: .standard(proto: "dst_identity_id"),
|
||
3: .same(proto: "version"),
|
||
4: .same(proto: "rules"),
|
||
]
|
||
|
||
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 1: try { try decoder.decodeSingularUInt32Field(value: &self.srcIdentityID) }()
|
||
case 2: try { try decoder.decodeSingularUInt32Field(value: &self.dstIdentityID) }()
|
||
case 3: try { try decoder.decodeSingularUInt32Field(value: &self.version) }()
|
||
case 4: try { try decoder.decodeSingularBytesField(value: &self.rules) }()
|
||
default: break
|
||
}
|
||
}
|
||
}
|
||
|
||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||
if self.srcIdentityID != 0 {
|
||
try visitor.visitSingularUInt32Field(value: self.srcIdentityID, fieldNumber: 1)
|
||
}
|
||
if self.dstIdentityID != 0 {
|
||
try visitor.visitSingularUInt32Field(value: self.dstIdentityID, fieldNumber: 2)
|
||
}
|
||
if self.version != 0 {
|
||
try visitor.visitSingularUInt32Field(value: self.version, fieldNumber: 3)
|
||
}
|
||
if !self.rules.isEmpty {
|
||
try visitor.visitSingularBytesField(value: self.rules, fieldNumber: 4)
|
||
}
|
||
try unknownFields.traverse(visitor: &visitor)
|
||
}
|
||
|
||
static func ==(lhs: SDLPolicyResponse, rhs: SDLPolicyResponse) -> Bool {
|
||
if lhs.srcIdentityID != rhs.srcIdentityID {return false}
|
||
if lhs.dstIdentityID != rhs.dstIdentityID {return false}
|
||
if lhs.version != rhs.version {return false}
|
||
if lhs.rules != rhs.rules {return false}
|
||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||
return true
|
||
}
|
||
}
|
||
|
||
extension SDLEvent: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||
static let protoMessageName: String = "SDLEvent"
|
||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||
1: .standard(proto: "nat_changed"),
|
||
2: .standard(proto: "send_register"),
|
||
3: .same(proto: "shutdown"),
|
||
]
|
||
|
||
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 1: try {
|
||
var v: SDLEvent.NatChanged?
|
||
var hadOneofValue = false
|
||
if let current = self.event {
|
||
hadOneofValue = true
|
||
if case .natChanged(let m) = current {v = m}
|
||
}
|
||
try decoder.decodeSingularMessageField(value: &v)
|
||
if let v = v {
|
||
if hadOneofValue {try decoder.handleConflictingOneOf()}
|
||
self.event = .natChanged(v)
|
||
}
|
||
}()
|
||
case 2: try {
|
||
var v: SDLEvent.SendRegister?
|
||
var hadOneofValue = false
|
||
if let current = self.event {
|
||
hadOneofValue = true
|
||
if case .sendRegister(let m) = current {v = m}
|
||
}
|
||
try decoder.decodeSingularMessageField(value: &v)
|
||
if let v = v {
|
||
if hadOneofValue {try decoder.handleConflictingOneOf()}
|
||
self.event = .sendRegister(v)
|
||
}
|
||
}()
|
||
case 3: try {
|
||
var v: SDLEvent.NetworkShutdown?
|
||
var hadOneofValue = false
|
||
if let current = self.event {
|
||
hadOneofValue = true
|
||
if case .shutdown(let m) = current {v = m}
|
||
}
|
||
try decoder.decodeSingularMessageField(value: &v)
|
||
if let v = v {
|
||
if hadOneofValue {try decoder.handleConflictingOneOf()}
|
||
self.event = .shutdown(v)
|
||
}
|
||
}()
|
||
default: break
|
||
}
|
||
}
|
||
}
|
||
|
||
func traverse<V: SwiftProtobuf.Visitor>(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
|
||
switch self.event {
|
||
case .natChanged?: try {
|
||
guard case .natChanged(let v)? = self.event else { preconditionFailure() }
|
||
try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
|
||
}()
|
||
case .sendRegister?: try {
|
||
guard case .sendRegister(let v)? = self.event else { preconditionFailure() }
|
||
try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
|
||
}()
|
||
case .shutdown?: try {
|
||
guard case .shutdown(let v)? = self.event else { preconditionFailure() }
|
||
try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
|
||
}()
|
||
case nil: break
|
||
}
|
||
try unknownFields.traverse(visitor: &visitor)
|
||
}
|
||
|
||
static func ==(lhs: SDLEvent, rhs: SDLEvent) -> Bool {
|
||
if lhs.event != rhs.event {return false}
|
||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||
return true
|
||
}
|
||
}
|
||
|
||
extension SDLEvent.NatChanged: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||
static let protoMessageName: String = SDLEvent.protoMessageName + ".NatChanged"
|
||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||
1: .same(proto: "mac"),
|
||
2: .same(proto: "ip"),
|
||
]
|
||
|
||
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 1: try { try decoder.decodeSingularBytesField(value: &self.mac) }()
|
||
case 2: try { try decoder.decodeSingularUInt32Field(value: &self.ip) }()
|
||
default: break
|
||
}
|
||
}
|
||
}
|
||
|
||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||
if !self.mac.isEmpty {
|
||
try visitor.visitSingularBytesField(value: self.mac, fieldNumber: 1)
|
||
}
|
||
if self.ip != 0 {
|
||
try visitor.visitSingularUInt32Field(value: self.ip, fieldNumber: 2)
|
||
}
|
||
try unknownFields.traverse(visitor: &visitor)
|
||
}
|
||
|
||
static func ==(lhs: SDLEvent.NatChanged, rhs: SDLEvent.NatChanged) -> Bool {
|
||
if lhs.mac != rhs.mac {return false}
|
||
if lhs.ip != rhs.ip {return false}
|
||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||
return true
|
||
}
|
||
}
|
||
|
||
extension SDLEvent.SendRegister: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||
static let protoMessageName: String = SDLEvent.protoMessageName + ".SendRegister"
|
||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||
1: .standard(proto: "dst_mac"),
|
||
2: .standard(proto: "nat_ip"),
|
||
3: .standard(proto: "nat_port"),
|
||
4: .standard(proto: "nat_type"),
|
||
5: .standard(proto: "v6_info"),
|
||
]
|
||
|
||
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 1: try { try decoder.decodeSingularBytesField(value: &self.dstMac) }()
|
||
case 2: try { try decoder.decodeSingularUInt32Field(value: &self.natIp) }()
|
||
case 3: try { try decoder.decodeSingularUInt32Field(value: &self.natPort) }()
|
||
case 4: try { try decoder.decodeSingularUInt32Field(value: &self.natType) }()
|
||
case 5: try { try decoder.decodeSingularMessageField(value: &self._v6Info) }()
|
||
default: break
|
||
}
|
||
}
|
||
}
|
||
|
||
func traverse<V: SwiftProtobuf.Visitor>(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
|
||
if !self.dstMac.isEmpty {
|
||
try visitor.visitSingularBytesField(value: self.dstMac, fieldNumber: 1)
|
||
}
|
||
if self.natIp != 0 {
|
||
try visitor.visitSingularUInt32Field(value: self.natIp, fieldNumber: 2)
|
||
}
|
||
if self.natPort != 0 {
|
||
try visitor.visitSingularUInt32Field(value: self.natPort, fieldNumber: 3)
|
||
}
|
||
if self.natType != 0 {
|
||
try visitor.visitSingularUInt32Field(value: self.natType, fieldNumber: 4)
|
||
}
|
||
try { if let v = self._v6Info {
|
||
try visitor.visitSingularMessageField(value: v, fieldNumber: 5)
|
||
} }()
|
||
try unknownFields.traverse(visitor: &visitor)
|
||
}
|
||
|
||
static func ==(lhs: SDLEvent.SendRegister, rhs: SDLEvent.SendRegister) -> Bool {
|
||
if lhs.dstMac != rhs.dstMac {return false}
|
||
if lhs.natIp != rhs.natIp {return false}
|
||
if lhs.natPort != rhs.natPort {return false}
|
||
if lhs.natType != rhs.natType {return false}
|
||
if lhs._v6Info != rhs._v6Info {return false}
|
||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||
return true
|
||
}
|
||
}
|
||
|
||
extension SDLEvent.NetworkShutdown: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||
static let protoMessageName: String = SDLEvent.protoMessageName + ".NetworkShutdown"
|
||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||
1: .same(proto: "message"),
|
||
]
|
||
|
||
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 1: try { try decoder.decodeSingularStringField(value: &self.message) }()
|
||
default: break
|
||
}
|
||
}
|
||
}
|
||
|
||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||
if !self.message.isEmpty {
|
||
try visitor.visitSingularStringField(value: self.message, fieldNumber: 1)
|
||
}
|
||
try unknownFields.traverse(visitor: &visitor)
|
||
}
|
||
|
||
static func ==(lhs: SDLEvent.NetworkShutdown, rhs: SDLEvent.NetworkShutdown) -> Bool {
|
||
if lhs.message != rhs.message {return false}
|
||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||
return true
|
||
}
|
||
}
|
||
|
||
extension SDLCommand: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||
static let protoMessageName: String = "SDLCommand"
|
||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||
1: .standard(proto: "pkt_id"),
|
||
2: .standard(proto: "exit_node"),
|
||
]
|
||
|
||
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 1: try { try decoder.decodeSingularUInt32Field(value: &self.pktID) }()
|
||
case 2: try {
|
||
var v: SDLCommand.ExitNodeControl?
|
||
var hadOneofValue = false
|
||
if let current = self.command {
|
||
hadOneofValue = true
|
||
if case .exitNode(let m) = current {v = m}
|
||
}
|
||
try decoder.decodeSingularMessageField(value: &v)
|
||
if let v = v {
|
||
if hadOneofValue {try decoder.handleConflictingOneOf()}
|
||
self.command = .exitNode(v)
|
||
}
|
||
}()
|
||
default: break
|
||
}
|
||
}
|
||
}
|
||
|
||
func traverse<V: SwiftProtobuf.Visitor>(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
|
||
if self.pktID != 0 {
|
||
try visitor.visitSingularUInt32Field(value: self.pktID, fieldNumber: 1)
|
||
}
|
||
try { if case .exitNode(let v)? = self.command {
|
||
try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
|
||
} }()
|
||
try unknownFields.traverse(visitor: &visitor)
|
||
}
|
||
|
||
static func ==(lhs: SDLCommand, rhs: SDLCommand) -> Bool {
|
||
if lhs.pktID != rhs.pktID {return false}
|
||
if lhs.command != rhs.command {return false}
|
||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||
return true
|
||
}
|
||
}
|
||
|
||
extension SDLCommand.ExitNodeControl: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||
static let protoMessageName: String = SDLCommand.protoMessageName + ".ExitNodeControl"
|
||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||
1: .same(proto: "action"),
|
||
2: .same(proto: "remark"),
|
||
]
|
||
|
||
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 1: try { try decoder.decodeSingularInt32Field(value: &self.action) }()
|
||
case 2: try { try decoder.decodeSingularStringField(value: &self.remark) }()
|
||
default: break
|
||
}
|
||
}
|
||
}
|
||
|
||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||
if self.action != 0 {
|
||
try visitor.visitSingularInt32Field(value: self.action, fieldNumber: 1)
|
||
}
|
||
if !self.remark.isEmpty {
|
||
try visitor.visitSingularStringField(value: self.remark, fieldNumber: 2)
|
||
}
|
||
try unknownFields.traverse(visitor: &visitor)
|
||
}
|
||
|
||
static func ==(lhs: SDLCommand.ExitNodeControl, rhs: SDLCommand.ExitNodeControl) -> Bool {
|
||
if lhs.action != rhs.action {return false}
|
||
if lhs.remark != rhs.remark {return false}
|
||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||
return true
|
||
}
|
||
}
|
||
|
||
extension SDLCommandAck: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||
static let protoMessageName: String = "SDLCommandAck"
|
||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||
1: .standard(proto: "pkt_id"),
|
||
2: .same(proto: "code"),
|
||
3: .same(proto: "message"),
|
||
4: .same(proto: "data"),
|
||
]
|
||
|
||
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 1: try { try decoder.decodeSingularUInt32Field(value: &self.pktID) }()
|
||
case 2: try { try decoder.decodeSingularInt32Field(value: &self.code) }()
|
||
case 3: try { try decoder.decodeSingularStringField(value: &self.message) }()
|
||
case 4: try { try decoder.decodeSingularBytesField(value: &self.data) }()
|
||
default: break
|
||
}
|
||
}
|
||
}
|
||
|
||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||
if self.pktID != 0 {
|
||
try visitor.visitSingularUInt32Field(value: self.pktID, fieldNumber: 1)
|
||
}
|
||
if self.code != 0 {
|
||
try visitor.visitSingularInt32Field(value: self.code, fieldNumber: 2)
|
||
}
|
||
if !self.message.isEmpty {
|
||
try visitor.visitSingularStringField(value: self.message, fieldNumber: 3)
|
||
}
|
||
if !self.data.isEmpty {
|
||
try visitor.visitSingularBytesField(value: self.data, fieldNumber: 4)
|
||
}
|
||
try unknownFields.traverse(visitor: &visitor)
|
||
}
|
||
|
||
static func ==(lhs: SDLCommandAck, rhs: SDLCommandAck) -> Bool {
|
||
if lhs.pktID != rhs.pktID {return false}
|
||
if lhs.code != rhs.code {return false}
|
||
if lhs.message != rhs.message {return false}
|
||
if lhs.data != rhs.data {return false}
|
||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||
return true
|
||
}
|
||
}
|
||
|
||
extension SDLStunRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||
static let protoMessageName: String = "SDLStunRequest"
|
||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||
1: .standard(proto: "client_id"),
|
||
2: .standard(proto: "network_id"),
|
||
3: .same(proto: "mac"),
|
||
4: .same(proto: "ip"),
|
||
5: .standard(proto: "nat_type"),
|
||
6: .standard(proto: "v6_info"),
|
||
7: .standard(proto: "session_token"),
|
||
]
|
||
|
||
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 1: try { try decoder.decodeSingularStringField(value: &self.clientID) }()
|
||
case 2: try { try decoder.decodeSingularUInt32Field(value: &self.networkID) }()
|
||
case 3: try { try decoder.decodeSingularBytesField(value: &self.mac) }()
|
||
case 4: try { try decoder.decodeSingularUInt32Field(value: &self.ip) }()
|
||
case 5: try { try decoder.decodeSingularUInt32Field(value: &self.natType) }()
|
||
case 6: try { try decoder.decodeSingularMessageField(value: &self._v6Info) }()
|
||
case 7: try { try decoder.decodeSingularBytesField(value: &self.sessionToken) }()
|
||
default: break
|
||
}
|
||
}
|
||
}
|
||
|
||
func traverse<V: SwiftProtobuf.Visitor>(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
|
||
if !self.clientID.isEmpty {
|
||
try visitor.visitSingularStringField(value: self.clientID, fieldNumber: 1)
|
||
}
|
||
if self.networkID != 0 {
|
||
try visitor.visitSingularUInt32Field(value: self.networkID, fieldNumber: 2)
|
||
}
|
||
if !self.mac.isEmpty {
|
||
try visitor.visitSingularBytesField(value: self.mac, fieldNumber: 3)
|
||
}
|
||
if self.ip != 0 {
|
||
try visitor.visitSingularUInt32Field(value: self.ip, fieldNumber: 4)
|
||
}
|
||
if self.natType != 0 {
|
||
try visitor.visitSingularUInt32Field(value: self.natType, fieldNumber: 5)
|
||
}
|
||
try { if let v = self._v6Info {
|
||
try visitor.visitSingularMessageField(value: v, fieldNumber: 6)
|
||
} }()
|
||
if !self.sessionToken.isEmpty {
|
||
try visitor.visitSingularBytesField(value: self.sessionToken, fieldNumber: 7)
|
||
}
|
||
try unknownFields.traverse(visitor: &visitor)
|
||
}
|
||
|
||
static func ==(lhs: SDLStunRequest, rhs: SDLStunRequest) -> Bool {
|
||
if lhs.clientID != rhs.clientID {return false}
|
||
if lhs.networkID != rhs.networkID {return false}
|
||
if lhs.mac != rhs.mac {return false}
|
||
if lhs.ip != rhs.ip {return false}
|
||
if lhs.natType != rhs.natType {return false}
|
||
if lhs._v6Info != rhs._v6Info {return false}
|
||
if lhs.sessionToken != rhs.sessionToken {return false}
|
||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||
return true
|
||
}
|
||
}
|
||
|
||
extension SDLStunReply: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||
static let protoMessageName: String = "SDLStunReply"
|
||
static let _protobuf_nameMap = SwiftProtobuf._NameMap()
|
||
|
||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||
// Load everything into unknown fields
|
||
while try decoder.nextFieldNumber() != nil {}
|
||
}
|
||
|
||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||
try unknownFields.traverse(visitor: &visitor)
|
||
}
|
||
|
||
static func ==(lhs: SDLStunReply, rhs: SDLStunReply) -> Bool {
|
||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||
return true
|
||
}
|
||
}
|
||
|
||
extension SDLData: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||
static let protoMessageName: String = "SDLData"
|
||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||
1: .standard(proto: "network_id"),
|
||
2: .standard(proto: "src_mac"),
|
||
3: .standard(proto: "dst_mac"),
|
||
4: .standard(proto: "is_p2p"),
|
||
5: .same(proto: "ttl"),
|
||
6: .same(proto: "data"),
|
||
7: .standard(proto: "session_token"),
|
||
8: .standard(proto: "identity_id"),
|
||
]
|
||
|
||
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 1: try { try decoder.decodeSingularUInt32Field(value: &self.networkID) }()
|
||
case 2: try { try decoder.decodeSingularBytesField(value: &self.srcMac) }()
|
||
case 3: try { try decoder.decodeSingularBytesField(value: &self.dstMac) }()
|
||
case 4: try { try decoder.decodeSingularBoolField(value: &self.isP2P) }()
|
||
case 5: try { try decoder.decodeSingularUInt32Field(value: &self.ttl) }()
|
||
case 6: try { try decoder.decodeSingularBytesField(value: &self.data) }()
|
||
case 7: try { try decoder.decodeSingularBytesField(value: &self.sessionToken) }()
|
||
case 8: try { try decoder.decodeSingularUInt32Field(value: &self.identityID) }()
|
||
default: break
|
||
}
|
||
}
|
||
}
|
||
|
||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||
if self.networkID != 0 {
|
||
try visitor.visitSingularUInt32Field(value: self.networkID, fieldNumber: 1)
|
||
}
|
||
if !self.srcMac.isEmpty {
|
||
try visitor.visitSingularBytesField(value: self.srcMac, fieldNumber: 2)
|
||
}
|
||
if !self.dstMac.isEmpty {
|
||
try visitor.visitSingularBytesField(value: self.dstMac, fieldNumber: 3)
|
||
}
|
||
if self.isP2P != false {
|
||
try visitor.visitSingularBoolField(value: self.isP2P, fieldNumber: 4)
|
||
}
|
||
if self.ttl != 0 {
|
||
try visitor.visitSingularUInt32Field(value: self.ttl, fieldNumber: 5)
|
||
}
|
||
if !self.data.isEmpty {
|
||
try visitor.visitSingularBytesField(value: self.data, fieldNumber: 6)
|
||
}
|
||
if !self.sessionToken.isEmpty {
|
||
try visitor.visitSingularBytesField(value: self.sessionToken, fieldNumber: 7)
|
||
}
|
||
if self.identityID != 0 {
|
||
try visitor.visitSingularUInt32Field(value: self.identityID, fieldNumber: 8)
|
||
}
|
||
try unknownFields.traverse(visitor: &visitor)
|
||
}
|
||
|
||
static func ==(lhs: SDLData, rhs: SDLData) -> Bool {
|
||
if lhs.networkID != rhs.networkID {return false}
|
||
if lhs.srcMac != rhs.srcMac {return false}
|
||
if lhs.dstMac != rhs.dstMac {return false}
|
||
if lhs.isP2P != rhs.isP2P {return false}
|
||
if lhs.ttl != rhs.ttl {return false}
|
||
if lhs.data != rhs.data {return false}
|
||
if lhs.sessionToken != rhs.sessionToken {return false}
|
||
if lhs.identityID != rhs.identityID {return false}
|
||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||
return true
|
||
}
|
||
}
|
||
|
||
extension SDLStunProbe: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||
static let protoMessageName: String = "SDLStunProbe"
|
||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||
1: .same(proto: "cookie"),
|
||
2: .same(proto: "attr"),
|
||
3: .same(proto: "step"),
|
||
]
|
||
|
||
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 1: try { try decoder.decodeSingularUInt32Field(value: &self.cookie) }()
|
||
case 2: try { try decoder.decodeSingularUInt32Field(value: &self.attr) }()
|
||
case 3: try { try decoder.decodeSingularUInt32Field(value: &self.step) }()
|
||
default: break
|
||
}
|
||
}
|
||
}
|
||
|
||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||
if self.cookie != 0 {
|
||
try visitor.visitSingularUInt32Field(value: self.cookie, fieldNumber: 1)
|
||
}
|
||
if self.attr != 0 {
|
||
try visitor.visitSingularUInt32Field(value: self.attr, fieldNumber: 2)
|
||
}
|
||
if self.step != 0 {
|
||
try visitor.visitSingularUInt32Field(value: self.step, fieldNumber: 3)
|
||
}
|
||
try unknownFields.traverse(visitor: &visitor)
|
||
}
|
||
|
||
static func ==(lhs: SDLStunProbe, rhs: SDLStunProbe) -> Bool {
|
||
if lhs.cookie != rhs.cookie {return false}
|
||
if lhs.attr != rhs.attr {return false}
|
||
if lhs.step != rhs.step {return false}
|
||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||
return true
|
||
}
|
||
}
|
||
|
||
extension SDLStunProbeReply: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||
static let protoMessageName: String = "SDLStunProbeReply"
|
||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||
1: .same(proto: "cookie"),
|
||
2: .same(proto: "step"),
|
||
3: .same(proto: "port"),
|
||
4: .same(proto: "ip"),
|
||
]
|
||
|
||
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 1: try { try decoder.decodeSingularUInt32Field(value: &self.cookie) }()
|
||
case 2: try { try decoder.decodeSingularUInt32Field(value: &self.step) }()
|
||
case 3: try { try decoder.decodeSingularUInt32Field(value: &self.port) }()
|
||
case 4: try { try decoder.decodeSingularUInt32Field(value: &self.ip) }()
|
||
default: break
|
||
}
|
||
}
|
||
}
|
||
|
||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||
if self.cookie != 0 {
|
||
try visitor.visitSingularUInt32Field(value: self.cookie, fieldNumber: 1)
|
||
}
|
||
if self.step != 0 {
|
||
try visitor.visitSingularUInt32Field(value: self.step, fieldNumber: 2)
|
||
}
|
||
if self.port != 0 {
|
||
try visitor.visitSingularUInt32Field(value: self.port, fieldNumber: 3)
|
||
}
|
||
if self.ip != 0 {
|
||
try visitor.visitSingularUInt32Field(value: self.ip, fieldNumber: 4)
|
||
}
|
||
try unknownFields.traverse(visitor: &visitor)
|
||
}
|
||
|
||
static func ==(lhs: SDLStunProbeReply, rhs: SDLStunProbeReply) -> Bool {
|
||
if lhs.cookie != rhs.cookie {return false}
|
||
if lhs.step != rhs.step {return false}
|
||
if lhs.port != rhs.port {return false}
|
||
if lhs.ip != rhs.ip {return false}
|
||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||
return true
|
||
}
|
||
}
|
||
|
||
extension SDLRegister: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||
static let protoMessageName: String = "SDLRegister"
|
||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||
1: .standard(proto: "network_id"),
|
||
2: .standard(proto: "src_mac"),
|
||
3: .standard(proto: "dst_mac"),
|
||
]
|
||
|
||
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 1: try { try decoder.decodeSingularUInt32Field(value: &self.networkID) }()
|
||
case 2: try { try decoder.decodeSingularBytesField(value: &self.srcMac) }()
|
||
case 3: try { try decoder.decodeSingularBytesField(value: &self.dstMac) }()
|
||
default: break
|
||
}
|
||
}
|
||
}
|
||
|
||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||
if self.networkID != 0 {
|
||
try visitor.visitSingularUInt32Field(value: self.networkID, fieldNumber: 1)
|
||
}
|
||
if !self.srcMac.isEmpty {
|
||
try visitor.visitSingularBytesField(value: self.srcMac, fieldNumber: 2)
|
||
}
|
||
if !self.dstMac.isEmpty {
|
||
try visitor.visitSingularBytesField(value: self.dstMac, fieldNumber: 3)
|
||
}
|
||
try unknownFields.traverse(visitor: &visitor)
|
||
}
|
||
|
||
static func ==(lhs: SDLRegister, rhs: SDLRegister) -> Bool {
|
||
if lhs.networkID != rhs.networkID {return false}
|
||
if lhs.srcMac != rhs.srcMac {return false}
|
||
if lhs.dstMac != rhs.dstMac {return false}
|
||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||
return true
|
||
}
|
||
}
|
||
|
||
extension SDLRegisterAck: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||
static let protoMessageName: String = "SDLRegisterAck"
|
||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||
1: .standard(proto: "network_id"),
|
||
2: .standard(proto: "src_mac"),
|
||
3: .standard(proto: "dst_mac"),
|
||
]
|
||
|
||
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 1: try { try decoder.decodeSingularUInt32Field(value: &self.networkID) }()
|
||
case 2: try { try decoder.decodeSingularBytesField(value: &self.srcMac) }()
|
||
case 3: try { try decoder.decodeSingularBytesField(value: &self.dstMac) }()
|
||
default: break
|
||
}
|
||
}
|
||
}
|
||
|
||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||
if self.networkID != 0 {
|
||
try visitor.visitSingularUInt32Field(value: self.networkID, fieldNumber: 1)
|
||
}
|
||
if !self.srcMac.isEmpty {
|
||
try visitor.visitSingularBytesField(value: self.srcMac, fieldNumber: 2)
|
||
}
|
||
if !self.dstMac.isEmpty {
|
||
try visitor.visitSingularBytesField(value: self.dstMac, fieldNumber: 3)
|
||
}
|
||
try unknownFields.traverse(visitor: &visitor)
|
||
}
|
||
|
||
static func ==(lhs: SDLRegisterAck, rhs: SDLRegisterAck) -> Bool {
|
||
if lhs.networkID != rhs.networkID {return false}
|
||
if lhs.srcMac != rhs.srcMac {return false}
|
||
if lhs.dstMac != rhs.dstMac {return false}
|
||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||
return true
|
||
}
|
||
}
|