This repository has been archived by the owner on Oct 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a3d53fe
commit 3333fdc
Showing
7 changed files
with
569 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,242 @@ | ||
// DO NOT EDIT. | ||
// | ||
// Generated by the Swift generator plugin for the protocol buffer compiler. | ||
// Source: ChannelPinMessage.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 IGPChannelPinMessage: SwiftProtobuf.RequestMessage { | ||
// 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. | ||
|
||
public var igpRequest: IGPRequest { | ||
get {return _storage._igpRequest ?? IGPRequest()} | ||
set {_uniqueStorage()._igpRequest = newValue} | ||
} | ||
/// Returns true if `igpRequest` has been explicitly set. | ||
public var hasIgpRequest: Bool {return _storage._igpRequest != nil} | ||
/// Clears the value of `igpRequest`. Subsequent reads from it will return its default value. | ||
public mutating func clearIgpRequest() {_storage._igpRequest = nil} | ||
|
||
public var igpRoomID: Int64 { | ||
get {return _storage._igpRoomID} | ||
set {_uniqueStorage()._igpRoomID = newValue} | ||
} | ||
|
||
public var igpMessageID: Int64 { | ||
get {return _storage._igpMessageID} | ||
set {_uniqueStorage()._igpMessageID = newValue} | ||
} | ||
|
||
public var unknownFields = SwiftProtobuf.UnknownStorage() | ||
|
||
public init() {} | ||
|
||
fileprivate var _storage = _StorageClass.defaultInstance | ||
} | ||
|
||
public struct IGPChannelPinMessageResponse: SwiftProtobuf.ResponseMessage { | ||
// 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. | ||
|
||
public var igpResponse: IGPResponse { | ||
get {return _storage._igpResponse ?? IGPResponse()} | ||
set {_uniqueStorage()._igpResponse = newValue} | ||
} | ||
/// Returns true if `igpResponse` has been explicitly set. | ||
public var hasIgpResponse: Bool {return _storage._igpResponse != nil} | ||
/// Clears the value of `igpResponse`. Subsequent reads from it will return its default value. | ||
public mutating func clearIgpResponse() {_storage._igpResponse = nil} | ||
|
||
public var igpRoomID: Int64 { | ||
get {return _storage._igpRoomID} | ||
set {_uniqueStorage()._igpRoomID = newValue} | ||
} | ||
|
||
public var igpPinnedMessage: IGPRoomMessage { | ||
get {return _storage._igpPinnedMessage ?? IGPRoomMessage()} | ||
set {_uniqueStorage()._igpPinnedMessage = newValue} | ||
} | ||
/// Returns true if `igpPinnedMessage` has been explicitly set. | ||
public var hasIgpPinnedMessage: Bool {return _storage._igpPinnedMessage != nil} | ||
/// Clears the value of `igpPinnedMessage`. Subsequent reads from it will return its default value. | ||
public mutating func clearIgpPinnedMessage() {_storage._igpPinnedMessage = nil} | ||
|
||
public var unknownFields = SwiftProtobuf.UnknownStorage() | ||
|
||
public init() {} | ||
|
||
fileprivate var _storage = _StorageClass.defaultInstance | ||
} | ||
|
||
// MARK: - Code below here is support for the SwiftProtobuf runtime. | ||
|
||
extension IGPChannelPinMessage: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { | ||
public static let protoMessageName: String = "IGPChannelPinMessage" | ||
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ | ||
1: .standard(proto: "IGP_request"), | ||
2: .standard(proto: "IGP_room_id"), | ||
3: .standard(proto: "IGP_message_id"), | ||
] | ||
|
||
fileprivate class _StorageClass { | ||
var _igpRequest: IGPRequest? = nil | ||
var _igpRoomID: Int64 = 0 | ||
var _igpMessageID: Int64 = 0 | ||
|
||
static let defaultInstance = _StorageClass() | ||
|
||
private init() {} | ||
|
||
init(copying source: _StorageClass) { | ||
_igpRequest = source._igpRequest | ||
_igpRoomID = source._igpRoomID | ||
_igpMessageID = source._igpMessageID | ||
} | ||
} | ||
|
||
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.decodeSingularMessageField(value: &_storage._igpRequest) | ||
case 2: try decoder.decodeSingularInt64Field(value: &_storage._igpRoomID) | ||
case 3: try decoder.decodeSingularInt64Field(value: &_storage._igpMessageID) | ||
default: break | ||
} | ||
} | ||
} | ||
} | ||
|
||
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws { | ||
try withExtendedLifetime(_storage) { (_storage: _StorageClass) in | ||
if let v = _storage._igpRequest { | ||
try visitor.visitSingularMessageField(value: v, fieldNumber: 1) | ||
} | ||
if _storage._igpRoomID != 0 { | ||
try visitor.visitSingularInt64Field(value: _storage._igpRoomID, fieldNumber: 2) | ||
} | ||
if _storage._igpMessageID != 0 { | ||
try visitor.visitSingularInt64Field(value: _storage._igpMessageID, fieldNumber: 3) | ||
} | ||
} | ||
try unknownFields.traverse(visitor: &visitor) | ||
} | ||
|
||
public func _protobuf_generated_isEqualTo(other: IGPChannelPinMessage) -> Bool { | ||
if _storage !== other._storage { | ||
let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_args: (_StorageClass, _StorageClass)) in | ||
let _storage = _args.0 | ||
let other_storage = _args.1 | ||
if _storage._igpRequest != other_storage._igpRequest {return false} | ||
if _storage._igpRoomID != other_storage._igpRoomID {return false} | ||
if _storage._igpMessageID != other_storage._igpMessageID {return false} | ||
return true | ||
} | ||
if !storagesAreEqual {return false} | ||
} | ||
if unknownFields != other.unknownFields {return false} | ||
return true | ||
} | ||
} | ||
|
||
extension IGPChannelPinMessageResponse: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { | ||
public static let protoMessageName: String = "IGPChannelPinMessageResponse" | ||
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ | ||
1: .standard(proto: "IGP_response"), | ||
2: .standard(proto: "IGP_room_id"), | ||
3: .standard(proto: "IGP_pinned_message"), | ||
] | ||
|
||
fileprivate class _StorageClass { | ||
var _igpResponse: IGPResponse? = nil | ||
var _igpRoomID: Int64 = 0 | ||
var _igpPinnedMessage: IGPRoomMessage? = nil | ||
|
||
static let defaultInstance = _StorageClass() | ||
|
||
private init() {} | ||
|
||
init(copying source: _StorageClass) { | ||
_igpResponse = source._igpResponse | ||
_igpRoomID = source._igpRoomID | ||
_igpPinnedMessage = source._igpPinnedMessage | ||
} | ||
} | ||
|
||
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.decodeSingularMessageField(value: &_storage._igpResponse) | ||
case 2: try decoder.decodeSingularInt64Field(value: &_storage._igpRoomID) | ||
case 3: try decoder.decodeSingularMessageField(value: &_storage._igpPinnedMessage) | ||
default: break | ||
} | ||
} | ||
} | ||
} | ||
|
||
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws { | ||
try withExtendedLifetime(_storage) { (_storage: _StorageClass) in | ||
if let v = _storage._igpResponse { | ||
try visitor.visitSingularMessageField(value: v, fieldNumber: 1) | ||
} | ||
if _storage._igpRoomID != 0 { | ||
try visitor.visitSingularInt64Field(value: _storage._igpRoomID, fieldNumber: 2) | ||
} | ||
if let v = _storage._igpPinnedMessage { | ||
try visitor.visitSingularMessageField(value: v, fieldNumber: 3) | ||
} | ||
} | ||
try unknownFields.traverse(visitor: &visitor) | ||
} | ||
|
||
public func _protobuf_generated_isEqualTo(other: IGPChannelPinMessageResponse) -> Bool { | ||
if _storage !== other._storage { | ||
let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_args: (_StorageClass, _StorageClass)) in | ||
let _storage = _args.0 | ||
let other_storage = _args.1 | ||
if _storage._igpResponse != other_storage._igpResponse {return false} | ||
if _storage._igpRoomID != other_storage._igpRoomID {return false} | ||
if _storage._igpPinnedMessage != other_storage._igpPinnedMessage {return false} | ||
return true | ||
} | ||
if !storagesAreEqual {return false} | ||
} | ||
if unknownFields != other.unknownFields {return false} | ||
return true | ||
} | ||
} |
This file contains 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
Oops, something went wrong.