390 lines
14 KiB
Swift
390 lines
14 KiB
Swift
// DO NOT EDIT.
|
|
// swift-format-ignore-file
|
|
//
|
|
// Generated by the Swift generator plugin for the protocol buffer compiler.
|
|
// Source: autopilotrpc/autopilot.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 Autopilotrpc_StatusRequest {
|
|
// 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 Autopilotrpc_StatusResponse {
|
|
// 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.
|
|
|
|
/// Indicates whether the autopilot is active or not.
|
|
var active: Bool = false
|
|
|
|
var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
|
|
init() {}
|
|
}
|
|
|
|
struct Autopilotrpc_ModifyStatusRequest {
|
|
// 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.
|
|
|
|
/// Whether the autopilot agent should be enabled or not.
|
|
var enable: Bool = false
|
|
|
|
var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
|
|
init() {}
|
|
}
|
|
|
|
struct Autopilotrpc_ModifyStatusResponse {
|
|
// 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 Autopilotrpc_QueryScoresRequest {
|
|
// 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 pubkeys: [String] = []
|
|
|
|
/// If set, we will ignore the local channel state when calculating scores.
|
|
var ignoreLocalState: Bool = false
|
|
|
|
var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
|
|
init() {}
|
|
}
|
|
|
|
struct Autopilotrpc_QueryScoresResponse {
|
|
// 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 results: [Autopilotrpc_QueryScoresResponse.HeuristicResult] = []
|
|
|
|
var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
|
|
struct HeuristicResult {
|
|
// 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 heuristic: String = String()
|
|
|
|
var scores: Dictionary<String,Double> = [:]
|
|
|
|
var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
|
|
init() {}
|
|
}
|
|
|
|
init() {}
|
|
}
|
|
|
|
struct Autopilotrpc_SetScoresRequest {
|
|
// 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.
|
|
|
|
/// The name of the heuristic to provide scores to.
|
|
var heuristic: String = String()
|
|
|
|
///
|
|
///A map from hex-encoded public keys to scores. Scores must be in the range
|
|
///[0.0, 1.0].
|
|
var scores: Dictionary<String,Double> = [:]
|
|
|
|
var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
|
|
init() {}
|
|
}
|
|
|
|
struct Autopilotrpc_SetScoresResponse {
|
|
// 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() {}
|
|
}
|
|
|
|
// MARK: - Code below here is support for the SwiftProtobuf runtime.
|
|
|
|
fileprivate let _protobuf_package = "autopilotrpc"
|
|
|
|
extension Autopilotrpc_StatusRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
static let protoMessageName: String = _protobuf_package + ".StatusRequest"
|
|
static let _protobuf_nameMap = SwiftProtobuf._NameMap()
|
|
|
|
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
|
while let _ = try decoder.nextFieldNumber() {
|
|
}
|
|
}
|
|
|
|
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
try unknownFields.traverse(visitor: &visitor)
|
|
}
|
|
|
|
static func ==(lhs: Autopilotrpc_StatusRequest, rhs: Autopilotrpc_StatusRequest) -> Bool {
|
|
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
return true
|
|
}
|
|
}
|
|
|
|
extension Autopilotrpc_StatusResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
static let protoMessageName: String = _protobuf_package + ".StatusResponse"
|
|
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
|
1: .same(proto: "active"),
|
|
]
|
|
|
|
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
|
while let fieldNumber = try decoder.nextFieldNumber() {
|
|
switch fieldNumber {
|
|
case 1: try decoder.decodeSingularBoolField(value: &self.active)
|
|
default: break
|
|
}
|
|
}
|
|
}
|
|
|
|
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
if self.active != false {
|
|
try visitor.visitSingularBoolField(value: self.active, fieldNumber: 1)
|
|
}
|
|
try unknownFields.traverse(visitor: &visitor)
|
|
}
|
|
|
|
static func ==(lhs: Autopilotrpc_StatusResponse, rhs: Autopilotrpc_StatusResponse) -> Bool {
|
|
if lhs.active != rhs.active {return false}
|
|
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
return true
|
|
}
|
|
}
|
|
|
|
extension Autopilotrpc_ModifyStatusRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
static let protoMessageName: String = _protobuf_package + ".ModifyStatusRequest"
|
|
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
|
1: .same(proto: "enable"),
|
|
]
|
|
|
|
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
|
while let fieldNumber = try decoder.nextFieldNumber() {
|
|
switch fieldNumber {
|
|
case 1: try decoder.decodeSingularBoolField(value: &self.enable)
|
|
default: break
|
|
}
|
|
}
|
|
}
|
|
|
|
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
if self.enable != false {
|
|
try visitor.visitSingularBoolField(value: self.enable, fieldNumber: 1)
|
|
}
|
|
try unknownFields.traverse(visitor: &visitor)
|
|
}
|
|
|
|
static func ==(lhs: Autopilotrpc_ModifyStatusRequest, rhs: Autopilotrpc_ModifyStatusRequest) -> Bool {
|
|
if lhs.enable != rhs.enable {return false}
|
|
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
return true
|
|
}
|
|
}
|
|
|
|
extension Autopilotrpc_ModifyStatusResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
static let protoMessageName: String = _protobuf_package + ".ModifyStatusResponse"
|
|
static let _protobuf_nameMap = SwiftProtobuf._NameMap()
|
|
|
|
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
|
while let _ = try decoder.nextFieldNumber() {
|
|
}
|
|
}
|
|
|
|
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
try unknownFields.traverse(visitor: &visitor)
|
|
}
|
|
|
|
static func ==(lhs: Autopilotrpc_ModifyStatusResponse, rhs: Autopilotrpc_ModifyStatusResponse) -> Bool {
|
|
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
return true
|
|
}
|
|
}
|
|
|
|
extension Autopilotrpc_QueryScoresRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
static let protoMessageName: String = _protobuf_package + ".QueryScoresRequest"
|
|
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
|
1: .same(proto: "pubkeys"),
|
|
2: .standard(proto: "ignore_local_state"),
|
|
]
|
|
|
|
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
|
while let fieldNumber = try decoder.nextFieldNumber() {
|
|
switch fieldNumber {
|
|
case 1: try decoder.decodeRepeatedStringField(value: &self.pubkeys)
|
|
case 2: try decoder.decodeSingularBoolField(value: &self.ignoreLocalState)
|
|
default: break
|
|
}
|
|
}
|
|
}
|
|
|
|
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
if !self.pubkeys.isEmpty {
|
|
try visitor.visitRepeatedStringField(value: self.pubkeys, fieldNumber: 1)
|
|
}
|
|
if self.ignoreLocalState != false {
|
|
try visitor.visitSingularBoolField(value: self.ignoreLocalState, fieldNumber: 2)
|
|
}
|
|
try unknownFields.traverse(visitor: &visitor)
|
|
}
|
|
|
|
static func ==(lhs: Autopilotrpc_QueryScoresRequest, rhs: Autopilotrpc_QueryScoresRequest) -> Bool {
|
|
if lhs.pubkeys != rhs.pubkeys {return false}
|
|
if lhs.ignoreLocalState != rhs.ignoreLocalState {return false}
|
|
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
return true
|
|
}
|
|
}
|
|
|
|
extension Autopilotrpc_QueryScoresResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
static let protoMessageName: String = _protobuf_package + ".QueryScoresResponse"
|
|
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
|
1: .same(proto: "results"),
|
|
]
|
|
|
|
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
|
while let fieldNumber = try decoder.nextFieldNumber() {
|
|
switch fieldNumber {
|
|
case 1: try decoder.decodeRepeatedMessageField(value: &self.results)
|
|
default: break
|
|
}
|
|
}
|
|
}
|
|
|
|
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
if !self.results.isEmpty {
|
|
try visitor.visitRepeatedMessageField(value: self.results, fieldNumber: 1)
|
|
}
|
|
try unknownFields.traverse(visitor: &visitor)
|
|
}
|
|
|
|
static func ==(lhs: Autopilotrpc_QueryScoresResponse, rhs: Autopilotrpc_QueryScoresResponse) -> Bool {
|
|
if lhs.results != rhs.results {return false}
|
|
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
return true
|
|
}
|
|
}
|
|
|
|
extension Autopilotrpc_QueryScoresResponse.HeuristicResult: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
static let protoMessageName: String = Autopilotrpc_QueryScoresResponse.protoMessageName + ".HeuristicResult"
|
|
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
|
1: .same(proto: "heuristic"),
|
|
2: .same(proto: "scores"),
|
|
]
|
|
|
|
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
|
while let fieldNumber = try decoder.nextFieldNumber() {
|
|
switch fieldNumber {
|
|
case 1: try decoder.decodeSingularStringField(value: &self.heuristic)
|
|
case 2: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufDouble>.self, value: &self.scores)
|
|
default: break
|
|
}
|
|
}
|
|
}
|
|
|
|
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
if !self.heuristic.isEmpty {
|
|
try visitor.visitSingularStringField(value: self.heuristic, fieldNumber: 1)
|
|
}
|
|
if !self.scores.isEmpty {
|
|
try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufDouble>.self, value: self.scores, fieldNumber: 2)
|
|
}
|
|
try unknownFields.traverse(visitor: &visitor)
|
|
}
|
|
|
|
static func ==(lhs: Autopilotrpc_QueryScoresResponse.HeuristicResult, rhs: Autopilotrpc_QueryScoresResponse.HeuristicResult) -> Bool {
|
|
if lhs.heuristic != rhs.heuristic {return false}
|
|
if lhs.scores != rhs.scores {return false}
|
|
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
return true
|
|
}
|
|
}
|
|
|
|
extension Autopilotrpc_SetScoresRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
static let protoMessageName: String = _protobuf_package + ".SetScoresRequest"
|
|
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
|
1: .same(proto: "heuristic"),
|
|
2: .same(proto: "scores"),
|
|
]
|
|
|
|
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
|
while let fieldNumber = try decoder.nextFieldNumber() {
|
|
switch fieldNumber {
|
|
case 1: try decoder.decodeSingularStringField(value: &self.heuristic)
|
|
case 2: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufDouble>.self, value: &self.scores)
|
|
default: break
|
|
}
|
|
}
|
|
}
|
|
|
|
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
if !self.heuristic.isEmpty {
|
|
try visitor.visitSingularStringField(value: self.heuristic, fieldNumber: 1)
|
|
}
|
|
if !self.scores.isEmpty {
|
|
try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufDouble>.self, value: self.scores, fieldNumber: 2)
|
|
}
|
|
try unknownFields.traverse(visitor: &visitor)
|
|
}
|
|
|
|
static func ==(lhs: Autopilotrpc_SetScoresRequest, rhs: Autopilotrpc_SetScoresRequest) -> Bool {
|
|
if lhs.heuristic != rhs.heuristic {return false}
|
|
if lhs.scores != rhs.scores {return false}
|
|
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
return true
|
|
}
|
|
}
|
|
|
|
extension Autopilotrpc_SetScoresResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
static let protoMessageName: String = _protobuf_package + ".SetScoresResponse"
|
|
static let _protobuf_nameMap = SwiftProtobuf._NameMap()
|
|
|
|
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
|
while let _ = try decoder.nextFieldNumber() {
|
|
}
|
|
}
|
|
|
|
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
try unknownFields.traverse(visitor: &visitor)
|
|
}
|
|
|
|
static func ==(lhs: Autopilotrpc_SetScoresResponse, rhs: Autopilotrpc_SetScoresResponse) -> Bool {
|
|
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
return true
|
|
}
|
|
}
|