Created
May 17, 2017 22:27
-
-
Save EdenShapiro/e8c10f6998d23005a7497ca7ba4ba148 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* DO NOT EDIT. | |
* | |
* Generated by the protocol buffer compiler. | |
* Source: connection_service.proto | |
* | |
*/ | |
import Foundation | |
import SwiftProtobuf | |
struct Bnet_Protocol_Connection_ConnectRequest: SwiftProtobuf.Message, SwiftProtobuf.Proto2Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf.ProtoNameProviding { | |
public var swiftClassName: String {return "Bnet_Protocol_Connection_ConnectRequest"} | |
public var protoMessageName: String {return "ConnectRequest"} | |
public var protoPackageName: String {return "bnet.protocol.connection"} | |
public static let _protobuf_fieldNames: FieldNameMap = [ | |
1: .unique(proto: "client_id", json: "clientId", swift: "clientId"), | |
2: .unique(proto: "bind_request", json: "bindRequest", swift: "bindRequest"), | |
] | |
private class _StorageClass { | |
typealias ExtendedMessage = Bnet_Protocol_Connection_ConnectRequest | |
var unknown = SwiftProtobuf.UnknownStorage() | |
var _clientId: Bnet_Protocol_ProcessId? = nil | |
var _bindRequest: Bnet_Protocol_Connection_BindRequest? = nil | |
init() {} | |
func decodeField(setter: inout SwiftProtobuf.FieldDecoder, protoFieldNumber: Int) throws { | |
switch protoFieldNumber { | |
case 1: try setter.decodeSingularMessageField(fieldType: Bnet_Protocol_ProcessId.self, value: &_clientId) | |
case 2: try setter.decodeSingularMessageField(fieldType: Bnet_Protocol_Connection_BindRequest.self, value: &_bindRequest) | |
default: break | |
} | |
} | |
func traverse(visitor: inout SwiftProtobuf.Visitor) throws { | |
if let v = _clientId { | |
try visitor.visitSingularMessageField(value: v, protoFieldNumber: 1) | |
} | |
if let v = _bindRequest { | |
try visitor.visitSingularMessageField(value: v, protoFieldNumber: 2) | |
} | |
unknown.traverse(visitor: &visitor) | |
} | |
func isEqualTo(other: _StorageClass) -> Bool { | |
if ((_clientId != nil || other._clientId != nil) && (_clientId == nil || other._clientId == nil || _clientId! != other._clientId!)) {return false} | |
if ((_bindRequest != nil || other._bindRequest != nil) && (_bindRequest == nil || other._bindRequest == nil || _bindRequest! != other._bindRequest!)) {return false} | |
if unknown != other.unknown {return false} | |
return true | |
} | |
func copy() -> _StorageClass { | |
let clone = _StorageClass() | |
clone.unknown = unknown | |
clone._clientId = _clientId | |
clone._bindRequest = _bindRequest | |
return clone | |
} | |
} | |
private var _storage = _StorageClass() | |
public var unknown: SwiftProtobuf.UnknownStorage { | |
get {return _storage.unknown} | |
set {_storage.unknown = newValue} | |
} | |
var clientId: Bnet_Protocol_ProcessId { | |
get {return _storage._clientId ?? Bnet_Protocol_ProcessId()} | |
set {_uniqueStorage()._clientId = newValue} | |
} | |
public var hasClientId: Bool { | |
return _storage._clientId != nil | |
} | |
public mutating func clearClientId() { | |
return _storage._clientId = nil | |
} | |
var bindRequest: Bnet_Protocol_Connection_BindRequest { | |
get {return _storage._bindRequest ?? Bnet_Protocol_Connection_BindRequest()} | |
set {_uniqueStorage()._bindRequest = newValue} | |
} | |
public var hasBindRequest: Bool { | |
return _storage._bindRequest != nil | |
} | |
public mutating func clearBindRequest() { | |
return _storage._bindRequest = nil | |
} | |
init() {} | |
public mutating func _protoc_generated_decodeField(setter: inout SwiftProtobuf.FieldDecoder, protoFieldNumber: Int) throws { | |
try _uniqueStorage().decodeField(setter: &setter, protoFieldNumber: protoFieldNumber) | |
} | |
public func _protoc_generated_traverse(visitor: inout SwiftProtobuf.Visitor) throws { | |
try _storage.traverse(visitor: &visitor) | |
} | |
public func _protoc_generated_isEqualTo(other: Bnet_Protocol_Connection_ConnectRequest) -> Bool { | |
return _storage === other._storage || _storage.isEqualTo(other: other._storage) | |
} | |
private mutating func _uniqueStorage() -> _StorageClass { | |
if !isKnownUniquelyReferenced(&_storage) { | |
_storage = _storage.copy() | |
} | |
return _storage | |
} | |
} | |
struct Bnet_Protocol_Connection_ConnectionMeteringContentHandles: SwiftProtobuf.Message, SwiftProtobuf.Proto2Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf.ProtoNameProviding { | |
public var swiftClassName: String {return "Bnet_Protocol_Connection_ConnectionMeteringContentHandles"} | |
public var protoMessageName: String {return "ConnectionMeteringContentHandles"} | |
public var protoPackageName: String {return "bnet.protocol.connection"} | |
public static let _protobuf_fieldNames: FieldNameMap = [ | |
1: .unique(proto: "content_handle", json: "contentHandle", swift: "contentHandle"), | |
] | |
public var unknown = SwiftProtobuf.UnknownStorage() | |
var contentHandle: [Bnet_Protocol_ContentHandle] = [] | |
init() {} | |
public mutating func _protoc_generated_decodeField(setter: inout SwiftProtobuf.FieldDecoder, protoFieldNumber: Int) throws { | |
switch protoFieldNumber { | |
case 1: try setter.decodeRepeatedMessageField(fieldType: Bnet_Protocol_ContentHandle.self, value: &contentHandle) | |
default: break | |
} | |
} | |
public func _protoc_generated_traverse(visitor: inout SwiftProtobuf.Visitor) throws { | |
if !contentHandle.isEmpty { | |
try visitor.visitRepeatedMessageField(value: contentHandle, protoFieldNumber: 1) | |
} | |
unknown.traverse(visitor: &visitor) | |
} | |
public func _protoc_generated_isEqualTo(other: Bnet_Protocol_Connection_ConnectionMeteringContentHandles) -> Bool { | |
if contentHandle != other.contentHandle {return false} | |
if unknown != other.unknown {return false} | |
return true | |
} | |
} | |
struct Bnet_Protocol_Connection_ConnectResponse: SwiftProtobuf.Message, SwiftProtobuf.Proto2Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf.ProtoNameProviding { | |
public var swiftClassName: String {return "Bnet_Protocol_Connection_ConnectResponse"} | |
public var protoMessageName: String {return "ConnectResponse"} | |
public var protoPackageName: String {return "bnet.protocol.connection"} | |
public static let _protobuf_fieldNames: FieldNameMap = [ | |
1: .unique(proto: "server_id", json: "serverId", swift: "serverId"), | |
2: .unique(proto: "client_id", json: "clientId", swift: "clientId"), | |
3: .unique(proto: "bind_result", json: "bindResult", swift: "bindResult"), | |
4: .unique(proto: "bind_response", json: "bindResponse", swift: "bindResponse"), | |
5: .unique(proto: "content_handle_array", json: "contentHandleArray", swift: "contentHandleArray"), | |
6: .unique(proto: "server_time", json: "serverTime", swift: "serverTime"), | |
] | |
private class _StorageClass { | |
typealias ExtendedMessage = Bnet_Protocol_Connection_ConnectResponse | |
var unknown = SwiftProtobuf.UnknownStorage() | |
var _serverId: Bnet_Protocol_ProcessId? = nil | |
var _clientId: Bnet_Protocol_ProcessId? = nil | |
var _bindResult: UInt32? = nil | |
var _bindResponse: Bnet_Protocol_Connection_BindResponse? = nil | |
var _contentHandleArray: Bnet_Protocol_Connection_ConnectionMeteringContentHandles? = nil | |
var _serverTime: UInt64? = nil | |
init() {} | |
func decodeField(setter: inout SwiftProtobuf.FieldDecoder, protoFieldNumber: Int) throws { | |
switch protoFieldNumber { | |
case 1: try setter.decodeSingularMessageField(fieldType: Bnet_Protocol_ProcessId.self, value: &_serverId) | |
case 2: try setter.decodeSingularMessageField(fieldType: Bnet_Protocol_ProcessId.self, value: &_clientId) | |
case 3: try setter.decodeSingularField(fieldType: SwiftProtobuf.ProtobufUInt32.self, value: &_bindResult) | |
case 4: try setter.decodeSingularMessageField(fieldType: Bnet_Protocol_Connection_BindResponse.self, value: &_bindResponse) | |
case 5: try setter.decodeSingularMessageField(fieldType: Bnet_Protocol_Connection_ConnectionMeteringContentHandles.self, value: &_contentHandleArray) | |
case 6: try setter.decodeSingularField(fieldType: SwiftProtobuf.ProtobufUInt64.self, value: &_serverTime) | |
default: break | |
} | |
} | |
func traverse(visitor: inout SwiftProtobuf.Visitor) throws { | |
if let v = _serverId { | |
try visitor.visitSingularMessageField(value: v, protoFieldNumber: 1) | |
} | |
if let v = _clientId { | |
try visitor.visitSingularMessageField(value: v, protoFieldNumber: 2) | |
} | |
if let v = _bindResult { | |
try visitor.visitSingularField(fieldType: SwiftProtobuf.ProtobufUInt32.self, value: v, protoFieldNumber: 3) | |
} | |
if let v = _bindResponse { | |
try visitor.visitSingularMessageField(value: v, protoFieldNumber: 4) | |
} | |
if let v = _contentHandleArray { | |
try visitor.visitSingularMessageField(value: v, protoFieldNumber: 5) | |
} | |
if let v = _serverTime { | |
try visitor.visitSingularField(fieldType: SwiftProtobuf.ProtobufUInt64.self, value: v, protoFieldNumber: 6) | |
} | |
unknown.traverse(visitor: &visitor) | |
} | |
func isEqualTo(other: _StorageClass) -> Bool { | |
if ((_serverId != nil || other._serverId != nil) && (_serverId == nil || other._serverId == nil || _serverId! != other._serverId!)) {return false} | |
if ((_clientId != nil || other._clientId != nil) && (_clientId == nil || other._clientId == nil || _clientId! != other._clientId!)) {return false} | |
if (_bindResult != other._bindResult) {return false} | |
if ((_bindResponse != nil || other._bindResponse != nil) && (_bindResponse == nil || other._bindResponse == nil || _bindResponse! != other._bindResponse!)) {return false} | |
if ((_contentHandleArray != nil || other._contentHandleArray != nil) && (_contentHandleArray == nil || other._contentHandleArray == nil || _contentHandleArray! != other._contentHandleArray!)) {return false} | |
if (_serverTime != other._serverTime) {return false} | |
if unknown != other.unknown {return false} | |
return true | |
} | |
func copy() -> _StorageClass { | |
let clone = _StorageClass() | |
clone.unknown = unknown | |
clone._serverId = _serverId | |
clone._clientId = _clientId | |
clone._bindResult = _bindResult | |
clone._bindResponse = _bindResponse | |
clone._contentHandleArray = _contentHandleArray | |
clone._serverTime = _serverTime | |
return clone | |
} | |
} | |
private var _storage = _StorageClass() | |
public var unknown: SwiftProtobuf.UnknownStorage { | |
get {return _storage.unknown} | |
set {_storage.unknown = newValue} | |
} | |
var serverId: Bnet_Protocol_ProcessId { | |
get {return _storage._serverId ?? Bnet_Protocol_ProcessId()} | |
set {_uniqueStorage()._serverId = newValue} | |
} | |
public var hasServerId: Bool { | |
return _storage._serverId != nil | |
} | |
public mutating func clearServerId() { | |
return _storage._serverId = nil | |
} | |
var clientId: Bnet_Protocol_ProcessId { | |
get {return _storage._clientId ?? Bnet_Protocol_ProcessId()} | |
set {_uniqueStorage()._clientId = newValue} | |
} | |
public var hasClientId: Bool { | |
return _storage._clientId != nil | |
} | |
public mutating func clearClientId() { | |
return _storage._clientId = nil | |
} | |
var bindResult: UInt32 { | |
get {return _storage._bindResult ?? 0} | |
set {_uniqueStorage()._bindResult = newValue} | |
} | |
public var hasBindResult: Bool { | |
return _storage._bindResult != nil | |
} | |
public mutating func clearBindResult() { | |
return _storage._bindResult = nil | |
} | |
var bindResponse: Bnet_Protocol_Connection_BindResponse { | |
get {return _storage._bindResponse ?? Bnet_Protocol_Connection_BindResponse()} | |
set {_uniqueStorage()._bindResponse = newValue} | |
} | |
public var hasBindResponse: Bool { | |
return _storage._bindResponse != nil | |
} | |
public mutating func clearBindResponse() { | |
return _storage._bindResponse = nil | |
} | |
var contentHandleArray: Bnet_Protocol_Connection_ConnectionMeteringContentHandles { | |
get {return _storage._contentHandleArray ?? Bnet_Protocol_Connection_ConnectionMeteringContentHandles()} | |
set {_uniqueStorage()._contentHandleArray = newValue} | |
} | |
public var hasContentHandleArray: Bool { | |
return _storage._contentHandleArray != nil | |
} | |
public mutating func clearContentHandleArray() { | |
return _storage._contentHandleArray = nil | |
} | |
var serverTime: UInt64 { | |
get {return _storage._serverTime ?? 0} | |
set {_uniqueStorage()._serverTime = newValue} | |
} | |
public var hasServerTime: Bool { | |
return _storage._serverTime != nil | |
} | |
public mutating func clearServerTime() { | |
return _storage._serverTime = nil | |
} | |
init() {} | |
public mutating func _protoc_generated_decodeField(setter: inout SwiftProtobuf.FieldDecoder, protoFieldNumber: Int) throws { | |
try _uniqueStorage().decodeField(setter: &setter, protoFieldNumber: protoFieldNumber) | |
} | |
public func _protoc_generated_traverse(visitor: inout SwiftProtobuf.Visitor) throws { | |
try _storage.traverse(visitor: &visitor) | |
} | |
public func _protoc_generated_isEqualTo(other: Bnet_Protocol_Connection_ConnectResponse) -> Bool { | |
return _storage === other._storage || _storage.isEqualTo(other: other._storage) | |
} | |
private mutating func _uniqueStorage() -> _StorageClass { | |
if !isKnownUniquelyReferenced(&_storage) { | |
_storage = _storage.copy() | |
} | |
return _storage | |
} | |
} | |
struct Bnet_Protocol_Connection_BoundService: SwiftProtobuf.Message, SwiftProtobuf.Proto2Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf.ProtoNameProviding { | |
public var swiftClassName: String {return "Bnet_Protocol_Connection_BoundService"} | |
public var protoMessageName: String {return "BoundService"} | |
public var protoPackageName: String {return "bnet.protocol.connection"} | |
public static let _protobuf_fieldNames: FieldNameMap = [ | |
1: .same(proto: "hash", swift: "hash"), | |
2: .same(proto: "id", swift: "id"), | |
] | |
public var unknown = SwiftProtobuf.UnknownStorage() | |
private var _hash: UInt32? = nil | |
var hash: UInt32 { | |
get {return _hash ?? 0} | |
set {_hash = newValue} | |
} | |
public var hasHash: Bool { | |
return _hash != nil | |
} | |
public mutating func clearHash() { | |
return _hash = nil | |
} | |
private var _id: UInt32? = nil | |
var id: UInt32 { | |
get {return _id ?? 0} | |
set {_id = newValue} | |
} | |
public var hasId: Bool { | |
return _id != nil | |
} | |
public mutating func clearId() { | |
return _id = nil | |
} | |
init() {} | |
public mutating func _protoc_generated_decodeField(setter: inout SwiftProtobuf.FieldDecoder, protoFieldNumber: Int) throws { | |
switch protoFieldNumber { | |
case 1: try setter.decodeSingularField(fieldType: SwiftProtobuf.ProtobufFixed32.self, value: &_hash) | |
case 2: try setter.decodeSingularField(fieldType: SwiftProtobuf.ProtobufUInt32.self, value: &_id) | |
default: break | |
} | |
} | |
public func _protoc_generated_traverse(visitor: inout SwiftProtobuf.Visitor) throws { | |
try visitor.visitSingularField(fieldType: SwiftProtobuf.ProtobufFixed32.self, value: _hash ?? 0, protoFieldNumber: 1) | |
try visitor.visitSingularField(fieldType: SwiftProtobuf.ProtobufUInt32.self, value: _id ?? 0, protoFieldNumber: 2) | |
unknown.traverse(visitor: &visitor) | |
} | |
public func _protoc_generated_isEqualTo(other: Bnet_Protocol_Connection_BoundService) -> Bool { | |
if (hash != other.hash) {return false} | |
if (id != other.id) {return false} | |
if unknown != other.unknown {return false} | |
return true | |
} | |
} | |
struct Bnet_Protocol_Connection_BindRequest: SwiftProtobuf.Message, SwiftProtobuf.Proto2Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf.ProtoNameProviding { | |
public var swiftClassName: String {return "Bnet_Protocol_Connection_BindRequest"} | |
public var protoMessageName: String {return "BindRequest"} | |
public var protoPackageName: String {return "bnet.protocol.connection"} | |
public static let _protobuf_fieldNames: FieldNameMap = [ | |
1: .unique(proto: "imported_service_hash", json: "importedServiceHash", swift: "importedServiceHash"), | |
2: .unique(proto: "exported_service", json: "exportedService", swift: "exportedService"), | |
] | |
public var unknown = SwiftProtobuf.UnknownStorage() | |
var importedServiceHash: [UInt32] = [] | |
var exportedService: [Bnet_Protocol_Connection_BoundService] = [] | |
init() {} | |
public mutating func _protoc_generated_decodeField(setter: inout SwiftProtobuf.FieldDecoder, protoFieldNumber: Int) throws { | |
switch protoFieldNumber { | |
case 1: try setter.decodeRepeatedField(fieldType: SwiftProtobuf.ProtobufFixed32.self, value: &importedServiceHash) | |
case 2: try setter.decodeRepeatedMessageField(fieldType: Bnet_Protocol_Connection_BoundService.self, value: &exportedService) | |
default: break | |
} | |
} | |
public func _protoc_generated_traverse(visitor: inout SwiftProtobuf.Visitor) throws { | |
if !importedServiceHash.isEmpty { | |
try visitor.visitRepeatedField(fieldType: SwiftProtobuf.ProtobufFixed32.self, value: importedServiceHash, protoFieldNumber: 1) | |
} | |
if !exportedService.isEmpty { | |
try visitor.visitRepeatedMessageField(value: exportedService, protoFieldNumber: 2) | |
} | |
unknown.traverse(visitor: &visitor) | |
} | |
public func _protoc_generated_isEqualTo(other: Bnet_Protocol_Connection_BindRequest) -> Bool { | |
if importedServiceHash != other.importedServiceHash {return false} | |
if exportedService != other.exportedService {return false} | |
if unknown != other.unknown {return false} | |
return true | |
} | |
} | |
struct Bnet_Protocol_Connection_BindResponse: SwiftProtobuf.Message, SwiftProtobuf.Proto2Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf.ProtoNameProviding { | |
public var swiftClassName: String {return "Bnet_Protocol_Connection_BindResponse"} | |
public var protoMessageName: String {return "BindResponse"} | |
public var protoPackageName: String {return "bnet.protocol.connection"} | |
public static let _protobuf_fieldNames: FieldNameMap = [ | |
1: .unique(proto: "imported_service_id", json: "importedServiceId", swift: "importedServiceId"), | |
] | |
public var unknown = SwiftProtobuf.UnknownStorage() | |
var importedServiceId: [UInt32] = [] | |
init() {} | |
public mutating func _protoc_generated_decodeField(setter: inout SwiftProtobuf.FieldDecoder, protoFieldNumber: Int) throws { | |
switch protoFieldNumber { | |
case 1: try setter.decodePackedField(fieldType: SwiftProtobuf.ProtobufUInt32.self, value: &importedServiceId) | |
default: break | |
} | |
} | |
public func _protoc_generated_traverse(visitor: inout SwiftProtobuf.Visitor) throws { | |
if !importedServiceId.isEmpty { | |
try visitor.visitPackedField(fieldType: SwiftProtobuf.ProtobufUInt32.self, value: importedServiceId, protoFieldNumber: 1) | |
} | |
unknown.traverse(visitor: &visitor) | |
} | |
public func _protoc_generated_isEqualTo(other: Bnet_Protocol_Connection_BindResponse) -> Bool { | |
if importedServiceId != other.importedServiceId {return false} | |
if unknown != other.unknown {return false} | |
return true | |
} | |
} | |
struct Bnet_Protocol_Connection_EchoRequest: SwiftProtobuf.Message, SwiftProtobuf.Proto2Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf.ProtoNameProviding { | |
public var swiftClassName: String {return "Bnet_Protocol_Connection_EchoRequest"} | |
public var protoMessageName: String {return "EchoRequest"} | |
public var protoPackageName: String {return "bnet.protocol.connection"} | |
public static let _protobuf_fieldNames: FieldNameMap = [ | |
1: .same(proto: "time", swift: "time"), | |
2: .unique(proto: "network_only", json: "networkOnly", swift: "networkOnly"), | |
3: .same(proto: "payload", swift: "payload"), | |
] | |
public var unknown = SwiftProtobuf.UnknownStorage() | |
private var _time: UInt64? = nil | |
var time: UInt64 { | |
get {return _time ?? 0} | |
set {_time = newValue} | |
} | |
public var hasTime: Bool { | |
return _time != nil | |
} | |
public mutating func clearTime() { | |
return _time = nil | |
} | |
private var _networkOnly: Bool? = nil | |
var networkOnly: Bool { | |
get {return _networkOnly ?? false} | |
set {_networkOnly = newValue} | |
} | |
public var hasNetworkOnly: Bool { | |
return _networkOnly != nil | |
} | |
public mutating func clearNetworkOnly() { | |
return _networkOnly = nil | |
} | |
private var _payload: Data? = nil | |
var payload: Data { | |
get {return _payload ?? Data()} | |
set {_payload = newValue} | |
} | |
public var hasPayload: Bool { | |
return _payload != nil | |
} | |
public mutating func clearPayload() { | |
return _payload = nil | |
} | |
init() {} | |
public mutating func _protoc_generated_decodeField(setter: inout SwiftProtobuf.FieldDecoder, protoFieldNumber: Int) throws { | |
switch protoFieldNumber { | |
case 1: try setter.decodeSingularField(fieldType: SwiftProtobuf.ProtobufFixed64.self, value: &_time) | |
case 2: try setter.decodeSingularField(fieldType: SwiftProtobuf.ProtobufBool.self, value: &_networkOnly) | |
case 3: try setter.decodeSingularField(fieldType: SwiftProtobuf.ProtobufBytes.self, value: &_payload) | |
default: break | |
} | |
} | |
public func _protoc_generated_traverse(visitor: inout SwiftProtobuf.Visitor) throws { | |
if let v = _time { | |
try visitor.visitSingularField(fieldType: SwiftProtobuf.ProtobufFixed64.self, value: v, protoFieldNumber: 1) | |
} | |
if let v = _networkOnly { | |
try visitor.visitSingularField(fieldType: SwiftProtobuf.ProtobufBool.self, value: v, protoFieldNumber: 2) | |
} | |
if let v = _payload { | |
try visitor.visitSingularField(fieldType: SwiftProtobuf.ProtobufBytes.self, value: v, protoFieldNumber: 3) | |
} | |
unknown.traverse(visitor: &visitor) | |
} | |
public func _protoc_generated_isEqualTo(other: Bnet_Protocol_Connection_EchoRequest) -> Bool { | |
if (time != other.time) {return false} | |
if (((_networkOnly != nil && _networkOnly! != false) || (other._networkOnly != nil && other._networkOnly! != false)) && (_networkOnly == nil || other._networkOnly == nil || _networkOnly! != other._networkOnly!)) {return false} | |
if (payload != other.payload) {return false} | |
if unknown != other.unknown {return false} | |
return true | |
} | |
} | |
struct Bnet_Protocol_Connection_EchoResponse: SwiftProtobuf.Message, SwiftProtobuf.Proto2Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf.ProtoNameProviding { | |
public var swiftClassName: String {return "Bnet_Protocol_Connection_EchoResponse"} | |
public var protoMessageName: String {return "EchoResponse"} | |
public var protoPackageName: String {return "bnet.protocol.connection"} | |
public static let _protobuf_fieldNames: FieldNameMap = [ | |
1: .same(proto: "time", swift: "time"), | |
2: .same(proto: "payload", swift: "payload"), | |
] | |
public var unknown = SwiftProtobuf.UnknownStorage() | |
private var _time: UInt64? = nil | |
var time: UInt64 { | |
get {return _time ?? 0} | |
set {_time = newValue} | |
} | |
public var hasTime: Bool { | |
return _time != nil | |
} | |
public mutating func clearTime() { | |
return _time = nil | |
} | |
private var _payload: Data? = nil | |
var payload: Data { | |
get {return _payload ?? Data()} | |
set {_payload = newValue} | |
} | |
public var hasPayload: Bool { | |
return _payload != nil | |
} | |
public mutating func clearPayload() { | |
return _payload = nil | |
} | |
init() {} | |
public mutating func _protoc_generated_decodeField(setter: inout SwiftProtobuf.FieldDecoder, protoFieldNumber: Int) throws { | |
switch protoFieldNumber { | |
case 1: try setter.decodeSingularField(fieldType: SwiftProtobuf.ProtobufFixed64.self, value: &_time) | |
case 2: try setter.decodeSingularField(fieldType: SwiftProtobuf.ProtobufBytes.self, value: &_payload) | |
default: break | |
} | |
} | |
public func _protoc_generated_traverse(visitor: inout SwiftProtobuf.Visitor) throws { | |
if let v = _time { | |
try visitor.visitSingularField(fieldType: SwiftProtobuf.ProtobufFixed64.self, value: v, protoFieldNumber: 1) | |
} | |
if let v = _payload { | |
try visitor.visitSingularField(fieldType: SwiftProtobuf.ProtobufBytes.self, value: v, protoFieldNumber: 2) | |
} | |
unknown.traverse(visitor: &visitor) | |
} | |
public func _protoc_generated_isEqualTo(other: Bnet_Protocol_Connection_EchoResponse) -> Bool { | |
if (time != other.time) {return false} | |
if (payload != other.payload) {return false} | |
if unknown != other.unknown {return false} | |
return true | |
} | |
} | |
struct Bnet_Protocol_Connection_DisconnectRequest: SwiftProtobuf.Message, SwiftProtobuf.Proto2Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf.ProtoNameProviding { | |
public var swiftClassName: String {return "Bnet_Protocol_Connection_DisconnectRequest"} | |
public var protoMessageName: String {return "DisconnectRequest"} | |
public var protoPackageName: String {return "bnet.protocol.connection"} | |
public static let _protobuf_fieldNames: FieldNameMap = [ | |
1: .unique(proto: "error_code", json: "errorCode", swift: "errorCode"), | |
] | |
public var unknown = SwiftProtobuf.UnknownStorage() | |
private var _errorCode: UInt32? = nil | |
var errorCode: UInt32 { | |
get {return _errorCode ?? 0} | |
set {_errorCode = newValue} | |
} | |
public var hasErrorCode: Bool { | |
return _errorCode != nil | |
} | |
public mutating func clearErrorCode() { | |
return _errorCode = nil | |
} | |
init() {} | |
public mutating func _protoc_generated_decodeField(setter: inout SwiftProtobuf.FieldDecoder, protoFieldNumber: Int) throws { | |
switch protoFieldNumber { | |
case 1: try setter.decodeSingularField(fieldType: SwiftProtobuf.ProtobufUInt32.self, value: &_errorCode) | |
default: break | |
} | |
} | |
public func _protoc_generated_traverse(visitor: inout SwiftProtobuf.Visitor) throws { | |
try visitor.visitSingularField(fieldType: SwiftProtobuf.ProtobufUInt32.self, value: _errorCode ?? 0, protoFieldNumber: 1) | |
unknown.traverse(visitor: &visitor) | |
} | |
public func _protoc_generated_isEqualTo(other: Bnet_Protocol_Connection_DisconnectRequest) -> Bool { | |
if (errorCode != other.errorCode) {return false} | |
if unknown != other.unknown {return false} | |
return true | |
} | |
} | |
struct Bnet_Protocol_Connection_DisconnectNotification: SwiftProtobuf.Message, SwiftProtobuf.Proto2Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf.ProtoNameProviding { | |
public var swiftClassName: String {return "Bnet_Protocol_Connection_DisconnectNotification"} | |
public var protoMessageName: String {return "DisconnectNotification"} | |
public var protoPackageName: String {return "bnet.protocol.connection"} | |
public static let _protobuf_fieldNames: FieldNameMap = [ | |
1: .unique(proto: "error_code", json: "errorCode", swift: "errorCode"), | |
2: .same(proto: "reason", swift: "reason"), | |
] | |
public var unknown = SwiftProtobuf.UnknownStorage() | |
private var _errorCode: UInt32? = nil | |
var errorCode: UInt32 { | |
get {return _errorCode ?? 0} | |
set {_errorCode = newValue} | |
} | |
public var hasErrorCode: Bool { | |
return _errorCode != nil | |
} | |
public mutating func clearErrorCode() { | |
return _errorCode = nil | |
} | |
private var _reason: String? = nil | |
var reason: String { | |
get {return _reason ?? ""} | |
set {_reason = newValue} | |
} | |
public var hasReason: Bool { | |
return _reason != nil | |
} | |
public mutating func clearReason() { | |
return _reason = nil | |
} | |
init() {} | |
public mutating func _protoc_generated_decodeField(setter: inout SwiftProtobuf.FieldDecoder, protoFieldNumber: Int) throws { | |
switch protoFieldNumber { | |
case 1: try setter.decodeSingularField(fieldType: SwiftProtobuf.ProtobufUInt32.self, value: &_errorCode) | |
case 2: try setter.decodeSingularField(fieldType: SwiftProtobuf.ProtobufString.self, value: &_reason) | |
default: break | |
} | |
} | |
public func _protoc_generated_traverse(visitor: inout SwiftProtobuf.Visitor) throws { | |
try visitor.visitSingularField(fieldType: SwiftProtobuf.ProtobufUInt32.self, value: _errorCode ?? 0, protoFieldNumber: 1) | |
if let v = _reason { | |
try visitor.visitSingularField(fieldType: SwiftProtobuf.ProtobufString.self, value: v, protoFieldNumber: 2) | |
} | |
unknown.traverse(visitor: &visitor) | |
} | |
public func _protoc_generated_isEqualTo(other: Bnet_Protocol_Connection_DisconnectNotification) -> Bool { | |
if (errorCode != other.errorCode) {return false} | |
if (reason != other.reason) {return false} | |
if unknown != other.unknown {return false} | |
return true | |
} | |
} | |
struct Bnet_Protocol_Connection_EncryptRequest: SwiftProtobuf.Message, SwiftProtobuf.Proto2Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf.ProtoNameProviding { | |
public var swiftClassName: String {return "Bnet_Protocol_Connection_EncryptRequest"} | |
public var protoMessageName: String {return "EncryptRequest"} | |
public var protoPackageName: String {return "bnet.protocol.connection"} | |
public static let _protobuf_fieldNames = FieldNameMap() | |
public var unknown = SwiftProtobuf.UnknownStorage() | |
init() {} | |
public mutating func _protoc_generated_decodeField(setter: inout SwiftProtobuf.FieldDecoder, protoFieldNumber: Int) throws { | |
} | |
public func _protoc_generated_traverse(visitor: inout SwiftProtobuf.Visitor) throws { | |
unknown.traverse(visitor: &visitor) | |
} | |
public func _protoc_generated_isEqualTo(other: Bnet_Protocol_Connection_EncryptRequest) -> Bool { | |
if unknown != other.unknown {return false} | |
return true | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment