2020-04-06 08:54:31 -07:00
|
|
|
// DO NOT EDIT.
|
|
|
|
//
|
|
|
|
// Generated by the Swift generator plugin for the protocol buffer compiler.
|
|
|
|
// Source: darkside.proto
|
|
|
|
//
|
2020-04-09 15:25:43 -07:00
|
|
|
// For information on using the generated types, please see the documentation:
|
2020-04-06 08:54:31 -07:00
|
|
|
// 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.
|
2020-04-09 15:25:43 -07:00
|
|
|
// Please ensure that you are building against the same version of the API
|
2020-04-06 08:54:31 -07:00
|
|
|
// 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
|
|
|
|
}
|
|
|
|
}
|