ZcashLightClientKit/ZcashLightClientKitTests/proto/darkside.pb.swift

78 lines
2.7 KiB
Swift
Raw Normal View History

// DO NOT EDIT.
//
// Generated by the Swift generator plugin for the protocol buffer compiler.
// Source: darkside.proto
//
// For information on using the generated types, please see the documentation:
// https://github.com/apple/swift-protobuf/
// Copyright (c) 2019-2020 The Zcash developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or https://www.opensource.org/licenses/mit-license.php .
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 DarksideState {
// 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 latestHeight: UInt64 = 0
var reorgHeight: UInt64 = 0
var unknownFields = SwiftProtobuf.UnknownStorage()
init() {}
}
// MARK: - Code below here is support for the SwiftProtobuf runtime.
fileprivate let _protobuf_package = "cash.z.wallet.sdk.rpc"
extension DarksideState: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
static let protoMessageName: String = _protobuf_package + ".DarksideState"
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "latestHeight"),
2: .same(proto: "reorgHeight"),
]
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
switch fieldNumber {
case 1: try decoder.decodeSingularUInt64Field(value: &self.latestHeight)
case 2: try decoder.decodeSingularUInt64Field(value: &self.reorgHeight)
default: break
}
}
}
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
if self.latestHeight != 0 {
try visitor.visitSingularUInt64Field(value: self.latestHeight, fieldNumber: 1)
}
if self.reorgHeight != 0 {
try visitor.visitSingularUInt64Field(value: self.reorgHeight, fieldNumber: 2)
}
try unknownFields.traverse(visitor: &visitor)
}
static func ==(lhs: DarksideState, rhs: DarksideState) -> Bool {
if lhs.latestHeight != rhs.latestHeight {return false}
if lhs.reorgHeight != rhs.reorgHeight {return false}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
}