|
|
|
@ -1,6 +1,10 @@
|
|
|
|
|
// DO NOT EDIT.
|
|
|
|
|
//
|
|
|
|
|
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
|
|
|
|
|
// Generated by the Swift generator plugin for the protocol buffer compiler.
|
|
|
|
|
// Source: WebSocketResources.proto
|
|
|
|
|
//
|
|
|
|
|
// For information on using the generated types, please see the documenation:
|
|
|
|
|
// https://github.com/apple/swift-protobuf/
|
|
|
|
|
|
|
|
|
|
//*
|
|
|
|
|
// Copyright (C) 2014-2016 Open Whisper Systems
|
|
|
|
@ -18,7 +22,7 @@ import SwiftProtobuf
|
|
|
|
|
// 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.
|
|
|
|
|
private struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
|
|
|
|
|
fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
|
|
|
|
|
struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
|
|
|
|
|
typealias Version = _2
|
|
|
|
|
}
|
|
|
|
@ -73,10 +77,10 @@ struct WebSocketProtos_WebSocketRequestMessage {
|
|
|
|
|
|
|
|
|
|
init() {}
|
|
|
|
|
|
|
|
|
|
fileprivate var _verb: String?
|
|
|
|
|
fileprivate var _path: String?
|
|
|
|
|
fileprivate var _body: Data?
|
|
|
|
|
fileprivate var _requestID: UInt64?
|
|
|
|
|
fileprivate var _verb: String? = nil
|
|
|
|
|
fileprivate var _path: String? = nil
|
|
|
|
|
fileprivate var _body: Data? = nil
|
|
|
|
|
fileprivate var _requestID: UInt64? = nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
struct WebSocketProtos_WebSocketResponseMessage {
|
|
|
|
@ -128,10 +132,10 @@ struct WebSocketProtos_WebSocketResponseMessage {
|
|
|
|
|
|
|
|
|
|
init() {}
|
|
|
|
|
|
|
|
|
|
fileprivate var _requestID: UInt64?
|
|
|
|
|
fileprivate var _status: UInt32?
|
|
|
|
|
fileprivate var _message: String?
|
|
|
|
|
fileprivate var _body: Data?
|
|
|
|
|
fileprivate var _requestID: UInt64? = nil
|
|
|
|
|
fileprivate var _status: UInt32? = nil
|
|
|
|
|
fileprivate var _message: String? = nil
|
|
|
|
|
fileprivate var _body: Data? = nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
struct WebSocketProtos_WebSocketMessage {
|
|
|
|
@ -203,9 +207,17 @@ struct WebSocketProtos_WebSocketMessage {
|
|
|
|
|
fileprivate var _storage = _StorageClass.defaultInstance
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#if swift(>=4.2)
|
|
|
|
|
|
|
|
|
|
extension WebSocketProtos_WebSocketMessage.TypeEnum: CaseIterable {
|
|
|
|
|
// Support synthesized by the compiler.
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif // swift(>=4.2)
|
|
|
|
|
|
|
|
|
|
// MARK: - Code below here is support for the SwiftProtobuf runtime.
|
|
|
|
|
|
|
|
|
|
private let _protobuf_package = "WebSocketProtos"
|
|
|
|
|
fileprivate let _protobuf_package = "WebSocketProtos"
|
|
|
|
|
|
|
|
|
|
extension WebSocketProtos_WebSocketRequestMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
|
|
|
static let protoMessageName: String = _protobuf_package + ".WebSocketRequestMessage"
|
|
|
|
@ -214,7 +226,7 @@ extension WebSocketProtos_WebSocketRequestMessage: SwiftProtobuf.Message, SwiftP
|
|
|
|
|
2: .same(proto: "path"),
|
|
|
|
|
3: .same(proto: "body"),
|
|
|
|
|
5: .same(proto: "headers"),
|
|
|
|
|
4: .same(proto: "requestId")
|
|
|
|
|
4: .same(proto: "requestId"),
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
|
|
|
@ -267,7 +279,7 @@ extension WebSocketProtos_WebSocketResponseMessage: SwiftProtobuf.Message, Swift
|
|
|
|
|
2: .same(proto: "status"),
|
|
|
|
|
3: .same(proto: "message"),
|
|
|
|
|
5: .same(proto: "headers"),
|
|
|
|
|
4: .same(proto: "body")
|
|
|
|
|
4: .same(proto: "body"),
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
|
|
|
@ -318,13 +330,13 @@ extension WebSocketProtos_WebSocketMessage: SwiftProtobuf.Message, SwiftProtobuf
|
|
|
|
|
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
|
|
|
|
1: .same(proto: "type"),
|
|
|
|
|
2: .same(proto: "request"),
|
|
|
|
|
3: .same(proto: "response")
|
|
|
|
|
3: .same(proto: "response"),
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
fileprivate class _StorageClass {
|
|
|
|
|
var _type: WebSocketProtos_WebSocketMessage.TypeEnum?
|
|
|
|
|
var _request: WebSocketProtos_WebSocketRequestMessage?
|
|
|
|
|
var _response: WebSocketProtos_WebSocketResponseMessage?
|
|
|
|
|
var _type: WebSocketProtos_WebSocketMessage.TypeEnum? = nil
|
|
|
|
|
var _request: WebSocketProtos_WebSocketRequestMessage? = nil
|
|
|
|
|
var _response: WebSocketProtos_WebSocketResponseMessage? = nil
|
|
|
|
|
|
|
|
|
|
static let defaultInstance = _StorageClass()
|
|
|
|
|
|
|
|
|
@ -394,6 +406,6 @@ extension WebSocketProtos_WebSocketMessage.TypeEnum: SwiftProtobuf._ProtoNamePro
|
|
|
|
|
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
|
|
|
|
0: .same(proto: "UNKNOWN"),
|
|
|
|
|
1: .same(proto: "REQUEST"),
|
|
|
|
|
2: .same(proto: "RESPONSE")
|
|
|
|
|
2: .same(proto: "RESPONSE"),
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|