Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
147 lines (126 sloc) 5.23 KB
// DO NOT EDIT.
//
// Generated by the Swift generator plugin for the protocol buffer compiler.
// Source: revoke_delegate.proto
//
// For information on using the generated types, please see the documenation:
// 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 your 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
}
public struct ForgeAbi_RevokeDelegationTx {
// 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.
/// address of the delegation between sender and receiver
public var address: String {
get {return _storage._address}
set {_uniqueStorage()._address = newValue}
}
/// delegatee's address
public var to: String {
get {return _storage._to}
set {_uniqueStorage()._to = newValue}
}
public var typeUrls: [String] {
get {return _storage._typeUrls}
set {_uniqueStorage()._typeUrls = newValue}
}
public var data: SwiftProtobuf.Google_Protobuf_Any {
get {return _storage._data ?? SwiftProtobuf.Google_Protobuf_Any()}
set {_uniqueStorage()._data = newValue}
}
/// Returns true if `data` has been explicitly set.
public var hasData: Bool {return _storage._data != nil}
/// Clears the value of `data`. Subsequent reads from it will return its default value.
public mutating func clearData() {_uniqueStorage()._data = nil}
public var unknownFields = SwiftProtobuf.UnknownStorage()
public init() {}
fileprivate var _storage = _StorageClass.defaultInstance
}
// MARK: - Code below here is support for the SwiftProtobuf runtime.
fileprivate let _protobuf_package = "forge_abi"
extension ForgeAbi_RevokeDelegationTx: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".RevokeDelegationTx"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "address"),
2: .same(proto: "to"),
3: .standard(proto: "type_urls"),
15: .same(proto: "data"),
]
fileprivate class _StorageClass {
var _address: String = String()
var _to: String = String()
var _typeUrls: [String] = []
var _data: SwiftProtobuf.Google_Protobuf_Any? = nil
static let defaultInstance = _StorageClass()
private init() {}
init(copying source: _StorageClass) {
_address = source._address
_to = source._to
_typeUrls = source._typeUrls
_data = source._data
}
}
fileprivate mutating func _uniqueStorage() -> _StorageClass {
if !isKnownUniquelyReferenced(&_storage) {
_storage = _StorageClass(copying: _storage)
}
return _storage
}
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
_ = _uniqueStorage()
try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
while let fieldNumber = try decoder.nextFieldNumber() {
switch fieldNumber {
case 1: try decoder.decodeSingularStringField(value: &_storage._address)
case 2: try decoder.decodeSingularStringField(value: &_storage._to)
case 3: try decoder.decodeRepeatedStringField(value: &_storage._typeUrls)
case 15: try decoder.decodeSingularMessageField(value: &_storage._data)
default: break
}
}
}
}
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
if !_storage._address.isEmpty {
try visitor.visitSingularStringField(value: _storage._address, fieldNumber: 1)
}
if !_storage._to.isEmpty {
try visitor.visitSingularStringField(value: _storage._to, fieldNumber: 2)
}
if !_storage._typeUrls.isEmpty {
try visitor.visitRepeatedStringField(value: _storage._typeUrls, fieldNumber: 3)
}
if let v = _storage._data {
try visitor.visitSingularMessageField(value: v, fieldNumber: 15)
}
}
try unknownFields.traverse(visitor: &visitor)
}
public static func ==(lhs: ForgeAbi_RevokeDelegationTx, rhs: ForgeAbi_RevokeDelegationTx) -> Bool {
if lhs._storage !== rhs._storage {
let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
let _storage = _args.0
let rhs_storage = _args.1
if _storage._address != rhs_storage._address {return false}
if _storage._to != rhs_storage._to {return false}
if _storage._typeUrls != rhs_storage._typeUrls {return false}
if _storage._data != rhs_storage._data {return false}
return true
}
if !storagesAreEqual {return false}
}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
}
You can’t perform that action at this time.