@blueid/access-proto 11.9.0 → 12.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BlueCore.proto +10 -38
- package/BlueNexusCore.proto +121 -0
- package/cjs/BlueCore_pb.d.ts +5 -177
- package/cjs/BlueCore_pb.js +2 -70
- package/cjs/BlueNexusCore_pb.d.ts +576 -0
- package/cjs/BlueNexusCore_pb.js +213 -0
- package/cjs/index.d.ts +1 -0
- package/cjs/index.js +1 -0
- package/es/BlueCore_pb.d.ts +5 -177
- package/es/BlueCore_pb.js +1 -67
- package/es/BlueNexusCore_pb.d.ts +576 -0
- package/es/BlueNexusCore_pb.js +212 -0
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- package/nanopb/BlueCore.pb.c +0 -18
- package/nanopb/BlueCore.pb.h +4 -124
- package/nanopb/BlueNexusCore.pb.c +63 -0
- package/nanopb/BlueNexusCore.pb.h +400 -0
- package/package.json +1 -1
- package/swift/BlueCore.pb.swift +2 -487
- package/swift/BlueNexusCore.pb.swift +1652 -0
|
@@ -0,0 +1,1652 @@
|
|
|
1
|
+
// DO NOT EDIT.
|
|
2
|
+
// swift-format-ignore-file
|
|
3
|
+
// swiftlint:disable all
|
|
4
|
+
//
|
|
5
|
+
// Generated by the Swift generator plugin for the protocol buffer compiler.
|
|
6
|
+
// Source: BlueNexusCore.proto
|
|
7
|
+
//
|
|
8
|
+
// For information on using the generated types, please see the documentation:
|
|
9
|
+
// https://github.com/apple/swift-protobuf/
|
|
10
|
+
|
|
11
|
+
import Foundation
|
|
12
|
+
import SwiftProtobuf
|
|
13
|
+
|
|
14
|
+
// If the compiler emits an error on this type, it is because this file
|
|
15
|
+
// was generated by a version of the `protoc` Swift plug-in that is
|
|
16
|
+
// incompatible with the version of SwiftProtobuf to which you are linking.
|
|
17
|
+
// Please ensure that you are building against the same version of the API
|
|
18
|
+
// that was used to generate this file.
|
|
19
|
+
fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
|
|
20
|
+
struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
|
|
21
|
+
typealias Version = _2
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
public struct BlueTransponderId: Sendable {
|
|
25
|
+
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
|
26
|
+
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
|
27
|
+
// methods supported on all messages.
|
|
28
|
+
|
|
29
|
+
/// Most NFC UIDs are 4, 7, or 10 bytes (not 15). When converted to hex, each byte becomes 2 hex characters → maximum 20 characters + null = 21 bytes
|
|
30
|
+
public var id: String {
|
|
31
|
+
get {return _id ?? String()}
|
|
32
|
+
set {_id = newValue}
|
|
33
|
+
}
|
|
34
|
+
/// Returns true if `id` has been explicitly set.
|
|
35
|
+
public var hasID: Bool {return self._id != nil}
|
|
36
|
+
/// Clears the value of `id`. Subsequent reads from it will return its default value.
|
|
37
|
+
public mutating func clearID() {self._id = nil}
|
|
38
|
+
|
|
39
|
+
public var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
40
|
+
|
|
41
|
+
public init() {}
|
|
42
|
+
|
|
43
|
+
fileprivate var _id: String? = nil
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
public struct BlueErrorResult: Sendable {
|
|
47
|
+
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
|
48
|
+
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
|
49
|
+
// methods supported on all messages.
|
|
50
|
+
|
|
51
|
+
public var data: String {
|
|
52
|
+
get {return _data ?? String()}
|
|
53
|
+
set {_data = newValue}
|
|
54
|
+
}
|
|
55
|
+
/// Returns true if `data` has been explicitly set.
|
|
56
|
+
public var hasData: Bool {return self._data != nil}
|
|
57
|
+
/// Clears the value of `data`. Subsequent reads from it will return its default value.
|
|
58
|
+
public mutating func clearData() {self._data = nil}
|
|
59
|
+
|
|
60
|
+
public var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
61
|
+
|
|
62
|
+
public init() {}
|
|
63
|
+
|
|
64
|
+
fileprivate var _data: String? = nil
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
public struct BlueWebSPHandshake: Sendable {
|
|
68
|
+
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
|
69
|
+
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
|
70
|
+
// methods supported on all messages.
|
|
71
|
+
|
|
72
|
+
public var salt: Data {
|
|
73
|
+
get {return _salt ?? Data()}
|
|
74
|
+
set {_salt = newValue}
|
|
75
|
+
}
|
|
76
|
+
/// Returns true if `salt` has been explicitly set.
|
|
77
|
+
public var hasSalt: Bool {return self._salt != nil}
|
|
78
|
+
/// Clears the value of `salt`. Subsequent reads from it will return its default value.
|
|
79
|
+
public mutating func clearSalt() {self._salt = nil}
|
|
80
|
+
|
|
81
|
+
public var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
82
|
+
|
|
83
|
+
public init() {}
|
|
84
|
+
|
|
85
|
+
fileprivate var _salt: Data? = nil
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
public struct BlueWebSPHandshakeReply: Sendable {
|
|
89
|
+
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
|
90
|
+
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
|
91
|
+
// methods supported on all messages.
|
|
92
|
+
|
|
93
|
+
public var deviceID: String {
|
|
94
|
+
get {return _deviceID ?? String()}
|
|
95
|
+
set {_deviceID = newValue}
|
|
96
|
+
}
|
|
97
|
+
/// Returns true if `deviceID` has been explicitly set.
|
|
98
|
+
public var hasDeviceID: Bool {return self._deviceID != nil}
|
|
99
|
+
/// Clears the value of `deviceID`. Subsequent reads from it will return its default value.
|
|
100
|
+
public mutating func clearDeviceID() {self._deviceID = nil}
|
|
101
|
+
|
|
102
|
+
public var signature: Data {
|
|
103
|
+
get {return _signature ?? Data()}
|
|
104
|
+
set {_signature = newValue}
|
|
105
|
+
}
|
|
106
|
+
/// Returns true if `signature` has been explicitly set.
|
|
107
|
+
public var hasSignature: Bool {return self._signature != nil}
|
|
108
|
+
/// Clears the value of `signature`. Subsequent reads from it will return its default value.
|
|
109
|
+
public mutating func clearSignature() {self._signature = nil}
|
|
110
|
+
|
|
111
|
+
public var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
112
|
+
|
|
113
|
+
public init() {}
|
|
114
|
+
|
|
115
|
+
fileprivate var _deviceID: String? = nil
|
|
116
|
+
fileprivate var _signature: Data? = nil
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
public struct BlueWebSPMessage: Sendable {
|
|
120
|
+
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
|
121
|
+
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
|
122
|
+
// methods supported on all messages.
|
|
123
|
+
|
|
124
|
+
public var transactionID: UInt32 {
|
|
125
|
+
get {return _transactionID ?? 0}
|
|
126
|
+
set {_transactionID = newValue}
|
|
127
|
+
}
|
|
128
|
+
/// Returns true if `transactionID` has been explicitly set.
|
|
129
|
+
public var hasTransactionID: Bool {return self._transactionID != nil}
|
|
130
|
+
/// Clears the value of `transactionID`. Subsequent reads from it will return its default value.
|
|
131
|
+
public mutating func clearTransactionID() {self._transactionID = nil}
|
|
132
|
+
|
|
133
|
+
public var payload: BlueSPResult {
|
|
134
|
+
get {return _payload ?? BlueSPResult()}
|
|
135
|
+
set {_payload = newValue}
|
|
136
|
+
}
|
|
137
|
+
/// Returns true if `payload` has been explicitly set.
|
|
138
|
+
public var hasPayload: Bool {return self._payload != nil}
|
|
139
|
+
/// Clears the value of `payload`. Subsequent reads from it will return its default value.
|
|
140
|
+
public mutating func clearPayload() {self._payload = nil}
|
|
141
|
+
|
|
142
|
+
public var isContinued: Bool {
|
|
143
|
+
get {return _isContinued ?? false}
|
|
144
|
+
set {_isContinued = newValue}
|
|
145
|
+
}
|
|
146
|
+
/// Returns true if `isContinued` has been explicitly set.
|
|
147
|
+
public var hasIsContinued: Bool {return self._isContinued != nil}
|
|
148
|
+
/// Clears the value of `isContinued`. Subsequent reads from it will return its default value.
|
|
149
|
+
public mutating func clearIsContinued() {self._isContinued = nil}
|
|
150
|
+
|
|
151
|
+
public var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
152
|
+
|
|
153
|
+
public init() {}
|
|
154
|
+
|
|
155
|
+
fileprivate var _transactionID: UInt32? = nil
|
|
156
|
+
fileprivate var _payload: BlueSPResult? = nil
|
|
157
|
+
fileprivate var _isContinued: Bool? = nil
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
public struct BlueWebSPStatusMessage: Sendable {
|
|
161
|
+
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
|
162
|
+
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
|
163
|
+
// methods supported on all messages.
|
|
164
|
+
|
|
165
|
+
public var status: BlueReturnCode {
|
|
166
|
+
get {return _status ?? .ok}
|
|
167
|
+
set {_status = newValue}
|
|
168
|
+
}
|
|
169
|
+
/// Returns true if `status` has been explicitly set.
|
|
170
|
+
public var hasStatus: Bool {return self._status != nil}
|
|
171
|
+
/// Clears the value of `status`. Subsequent reads from it will return its default value.
|
|
172
|
+
public mutating func clearStatus() {self._status = nil}
|
|
173
|
+
|
|
174
|
+
public var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
175
|
+
|
|
176
|
+
public init() {}
|
|
177
|
+
|
|
178
|
+
fileprivate var _status: BlueReturnCode? = nil
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
public struct BlueSocketConfigurationResponse: Sendable {
|
|
182
|
+
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
|
183
|
+
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
|
184
|
+
// methods supported on all messages.
|
|
185
|
+
|
|
186
|
+
public var transponderID: BlueTransponderId {
|
|
187
|
+
get {return _transponderID ?? BlueTransponderId()}
|
|
188
|
+
set {_transponderID = newValue}
|
|
189
|
+
}
|
|
190
|
+
/// Returns true if `transponderID` has been explicitly set.
|
|
191
|
+
public var hasTransponderID: Bool {return self._transponderID != nil}
|
|
192
|
+
/// Clears the value of `transponderID`. Subsequent reads from it will return its default value.
|
|
193
|
+
public mutating func clearTransponderID() {self._transponderID = nil}
|
|
194
|
+
|
|
195
|
+
public var config: BlueOssSoConfiguration {
|
|
196
|
+
get {return _config ?? BlueOssSoConfiguration()}
|
|
197
|
+
set {_config = newValue}
|
|
198
|
+
}
|
|
199
|
+
/// Returns true if `config` has been explicitly set.
|
|
200
|
+
public var hasConfig: Bool {return self._config != nil}
|
|
201
|
+
/// Clears the value of `config`. Subsequent reads from it will return its default value.
|
|
202
|
+
public mutating func clearConfig() {self._config = nil}
|
|
203
|
+
|
|
204
|
+
public var error: BlueErrorResult {
|
|
205
|
+
get {return _error ?? BlueErrorResult()}
|
|
206
|
+
set {_error = newValue}
|
|
207
|
+
}
|
|
208
|
+
/// Returns true if `error` has been explicitly set.
|
|
209
|
+
public var hasError: Bool {return self._error != nil}
|
|
210
|
+
/// Clears the value of `error`. Subsequent reads from it will return its default value.
|
|
211
|
+
public mutating func clearError() {self._error = nil}
|
|
212
|
+
|
|
213
|
+
public var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
214
|
+
|
|
215
|
+
public init() {}
|
|
216
|
+
|
|
217
|
+
fileprivate var _transponderID: BlueTransponderId? = nil
|
|
218
|
+
fileprivate var _config: BlueOssSoConfiguration? = nil
|
|
219
|
+
fileprivate var _error: BlueErrorResult? = nil
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
public struct BlueSocketRequestConfiguration: Sendable {
|
|
223
|
+
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
|
224
|
+
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
|
225
|
+
// methods supported on all messages.
|
|
226
|
+
|
|
227
|
+
public var transponderID: BlueTransponderId {
|
|
228
|
+
get {return _transponderID ?? BlueTransponderId()}
|
|
229
|
+
set {_transponderID = newValue}
|
|
230
|
+
}
|
|
231
|
+
/// Returns true if `transponderID` has been explicitly set.
|
|
232
|
+
public var hasTransponderID: Bool {return self._transponderID != nil}
|
|
233
|
+
/// Clears the value of `transponderID`. Subsequent reads from it will return its default value.
|
|
234
|
+
public mutating func clearTransponderID() {self._transponderID = nil}
|
|
235
|
+
|
|
236
|
+
public var aid: UInt32 {
|
|
237
|
+
get {return _aid ?? 0}
|
|
238
|
+
set {_aid = newValue}
|
|
239
|
+
}
|
|
240
|
+
/// Returns true if `aid` has been explicitly set.
|
|
241
|
+
public var hasAid: Bool {return self._aid != nil}
|
|
242
|
+
/// Clears the value of `aid`. Subsequent reads from it will return its default value.
|
|
243
|
+
public mutating func clearAid() {self._aid = nil}
|
|
244
|
+
|
|
245
|
+
public var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
246
|
+
|
|
247
|
+
public init() {}
|
|
248
|
+
|
|
249
|
+
fileprivate var _transponderID: BlueTransponderId? = nil
|
|
250
|
+
fileprivate var _aid: UInt32? = nil
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/// Message sent by the server to the device
|
|
254
|
+
public struct BlueWebSPServerMessage: Sendable {
|
|
255
|
+
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
|
256
|
+
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
|
257
|
+
// methods supported on all messages.
|
|
258
|
+
|
|
259
|
+
public var payload: BlueWebSPServerMessage.OneOf_Payload? = nil
|
|
260
|
+
|
|
261
|
+
public var handshake: BlueWebSPHandshake {
|
|
262
|
+
get {
|
|
263
|
+
if case .handshake(let v)? = payload {return v}
|
|
264
|
+
return BlueWebSPHandshake()
|
|
265
|
+
}
|
|
266
|
+
set {payload = .handshake(newValue)}
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
public var command: BlueSPTokenCommand {
|
|
270
|
+
get {
|
|
271
|
+
if case .command(let v)? = payload {return v}
|
|
272
|
+
return BlueSPTokenCommand()
|
|
273
|
+
}
|
|
274
|
+
set {payload = .command(newValue)}
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
public var ossSo: BlueOssSoMobile {
|
|
278
|
+
get {
|
|
279
|
+
if case .ossSo(let v)? = payload {return v}
|
|
280
|
+
return BlueOssSoMobile()
|
|
281
|
+
}
|
|
282
|
+
set {payload = .ossSo(newValue)}
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
public var ossSid: BlueOssSidMobile {
|
|
286
|
+
get {
|
|
287
|
+
if case .ossSid(let v)? = payload {return v}
|
|
288
|
+
return BlueOssSidMobile()
|
|
289
|
+
}
|
|
290
|
+
set {payload = .ossSid(newValue)}
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
public var configResponse: BlueSocketConfigurationResponse {
|
|
294
|
+
get {
|
|
295
|
+
if case .configResponse(let v)? = payload {return v}
|
|
296
|
+
return BlueSocketConfigurationResponse()
|
|
297
|
+
}
|
|
298
|
+
set {payload = .configResponse(newValue)}
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
public var socketMessage: BlueWebSPServerSocketMessage {
|
|
302
|
+
get {
|
|
303
|
+
if case .socketMessage(let v)? = payload {return v}
|
|
304
|
+
return BlueWebSPServerSocketMessage()
|
|
305
|
+
}
|
|
306
|
+
set {payload = .socketMessage(newValue)}
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
public var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
310
|
+
|
|
311
|
+
public enum OneOf_Payload: Equatable, Sendable {
|
|
312
|
+
case handshake(BlueWebSPHandshake)
|
|
313
|
+
case command(BlueSPTokenCommand)
|
|
314
|
+
case ossSo(BlueOssSoMobile)
|
|
315
|
+
case ossSid(BlueOssSidMobile)
|
|
316
|
+
case configResponse(BlueSocketConfigurationResponse)
|
|
317
|
+
case socketMessage(BlueWebSPServerSocketMessage)
|
|
318
|
+
|
|
319
|
+
fileprivate var isInitialized: Bool {
|
|
320
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
321
|
+
// allocates stack space for every case branch when no optimizations are
|
|
322
|
+
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
|
323
|
+
switch self {
|
|
324
|
+
case .handshake: return {
|
|
325
|
+
guard case .handshake(let v) = self else { preconditionFailure() }
|
|
326
|
+
return v.isInitialized
|
|
327
|
+
}()
|
|
328
|
+
case .command: return {
|
|
329
|
+
guard case .command(let v) = self else { preconditionFailure() }
|
|
330
|
+
return v.isInitialized
|
|
331
|
+
}()
|
|
332
|
+
case .ossSo: return {
|
|
333
|
+
guard case .ossSo(let v) = self else { preconditionFailure() }
|
|
334
|
+
return v.isInitialized
|
|
335
|
+
}()
|
|
336
|
+
case .ossSid: return {
|
|
337
|
+
guard case .ossSid(let v) = self else { preconditionFailure() }
|
|
338
|
+
return v.isInitialized
|
|
339
|
+
}()
|
|
340
|
+
case .configResponse: return {
|
|
341
|
+
guard case .configResponse(let v) = self else { preconditionFailure() }
|
|
342
|
+
return v.isInitialized
|
|
343
|
+
}()
|
|
344
|
+
case .socketMessage: return {
|
|
345
|
+
guard case .socketMessage(let v) = self else { preconditionFailure() }
|
|
346
|
+
return v.isInitialized
|
|
347
|
+
}()
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
public init() {}
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
public struct BlueWebSPClientRequest: Sendable {
|
|
357
|
+
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
|
358
|
+
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
|
359
|
+
// methods supported on all messages.
|
|
360
|
+
|
|
361
|
+
public var payload: BlueWebSPClientRequest.OneOf_Payload? = nil
|
|
362
|
+
|
|
363
|
+
public var requestConfig: BlueSocketRequestConfiguration {
|
|
364
|
+
get {
|
|
365
|
+
if case .requestConfig(let v)? = payload {return v}
|
|
366
|
+
return BlueSocketRequestConfiguration()
|
|
367
|
+
}
|
|
368
|
+
set {payload = .requestConfig(newValue)}
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
public var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
372
|
+
|
|
373
|
+
public enum OneOf_Payload: Equatable, Sendable {
|
|
374
|
+
case requestConfig(BlueSocketRequestConfiguration)
|
|
375
|
+
|
|
376
|
+
fileprivate var isInitialized: Bool {
|
|
377
|
+
guard case .requestConfig(let v) = self else {return true}
|
|
378
|
+
return v.isInitialized
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
public init() {}
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
public struct BlueWebSPClientResponse: Sendable {
|
|
387
|
+
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
|
388
|
+
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
|
389
|
+
// methods supported on all messages.
|
|
390
|
+
|
|
391
|
+
public var payload: BlueWebSPClientResponse.OneOf_Payload? = nil
|
|
392
|
+
|
|
393
|
+
public var message: BlueWebSPMessage {
|
|
394
|
+
get {
|
|
395
|
+
if case .message(let v)? = payload {return v}
|
|
396
|
+
return BlueWebSPMessage()
|
|
397
|
+
}
|
|
398
|
+
set {payload = .message(newValue)}
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
public var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
402
|
+
|
|
403
|
+
public enum OneOf_Payload: Equatable, Sendable {
|
|
404
|
+
case message(BlueWebSPMessage)
|
|
405
|
+
|
|
406
|
+
fileprivate var isInitialized: Bool {
|
|
407
|
+
guard case .message(let v) = self else {return true}
|
|
408
|
+
return v.isInitialized
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
public init() {}
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
/// Message sent to the server by the device
|
|
417
|
+
public struct BlueWebSPClientMessage: Sendable {
|
|
418
|
+
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
|
419
|
+
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
|
420
|
+
// methods supported on all messages.
|
|
421
|
+
|
|
422
|
+
public var payload: BlueWebSPClientMessage.OneOf_Payload? = nil
|
|
423
|
+
|
|
424
|
+
public var request: BlueWebSPClientRequest {
|
|
425
|
+
get {
|
|
426
|
+
if case .request(let v)? = payload {return v}
|
|
427
|
+
return BlueWebSPClientRequest()
|
|
428
|
+
}
|
|
429
|
+
set {payload = .request(newValue)}
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
public var response: BlueWebSPClientResponse {
|
|
433
|
+
get {
|
|
434
|
+
if case .response(let v)? = payload {return v}
|
|
435
|
+
return BlueWebSPClientResponse()
|
|
436
|
+
}
|
|
437
|
+
set {payload = .response(newValue)}
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
public var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
441
|
+
|
|
442
|
+
public enum OneOf_Payload: Equatable, Sendable {
|
|
443
|
+
case request(BlueWebSPClientRequest)
|
|
444
|
+
case response(BlueWebSPClientResponse)
|
|
445
|
+
|
|
446
|
+
fileprivate var isInitialized: Bool {
|
|
447
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
448
|
+
// allocates stack space for every case branch when no optimizations are
|
|
449
|
+
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
|
450
|
+
switch self {
|
|
451
|
+
case .request: return {
|
|
452
|
+
guard case .request(let v) = self else { preconditionFailure() }
|
|
453
|
+
return v.isInitialized
|
|
454
|
+
}()
|
|
455
|
+
case .response: return {
|
|
456
|
+
guard case .response(let v) = self else { preconditionFailure() }
|
|
457
|
+
return v.isInitialized
|
|
458
|
+
}()
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
public init() {}
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
public struct BlueWebSPServerSocketMessageSuccess: Sendable {
|
|
468
|
+
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
|
469
|
+
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
|
470
|
+
// methods supported on all messages.
|
|
471
|
+
|
|
472
|
+
public var result: BlueSPResult {
|
|
473
|
+
get {return _result ?? BlueSPResult()}
|
|
474
|
+
set {_result = newValue}
|
|
475
|
+
}
|
|
476
|
+
/// Returns true if `result` has been explicitly set.
|
|
477
|
+
public var hasResult: Bool {return self._result != nil}
|
|
478
|
+
/// Clears the value of `result`. Subsequent reads from it will return its default value.
|
|
479
|
+
public mutating func clearResult() {self._result = nil}
|
|
480
|
+
|
|
481
|
+
public var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
482
|
+
|
|
483
|
+
public init() {}
|
|
484
|
+
|
|
485
|
+
fileprivate var _result: BlueSPResult? = nil
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
public struct BlueWebSPServerSocketMessageFailed: Sendable {
|
|
489
|
+
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
|
490
|
+
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
|
491
|
+
// methods supported on all messages.
|
|
492
|
+
|
|
493
|
+
public var result: BlueErrorResult {
|
|
494
|
+
get {return _result ?? BlueErrorResult()}
|
|
495
|
+
set {_result = newValue}
|
|
496
|
+
}
|
|
497
|
+
/// Returns true if `result` has been explicitly set.
|
|
498
|
+
public var hasResult: Bool {return self._result != nil}
|
|
499
|
+
/// Clears the value of `result`. Subsequent reads from it will return its default value.
|
|
500
|
+
public mutating func clearResult() {self._result = nil}
|
|
501
|
+
|
|
502
|
+
public var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
503
|
+
|
|
504
|
+
public init() {}
|
|
505
|
+
|
|
506
|
+
fileprivate var _result: BlueErrorResult? = nil
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
public struct BlueWebSPServerSocketMessageDone: Sendable {
|
|
510
|
+
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
|
511
|
+
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
|
512
|
+
// methods supported on all messages.
|
|
513
|
+
|
|
514
|
+
public var result: BlueSPResult {
|
|
515
|
+
get {return _result ?? BlueSPResult()}
|
|
516
|
+
set {_result = newValue}
|
|
517
|
+
}
|
|
518
|
+
/// Returns true if `result` has been explicitly set.
|
|
519
|
+
public var hasResult: Bool {return self._result != nil}
|
|
520
|
+
/// Clears the value of `result`. Subsequent reads from it will return its default value.
|
|
521
|
+
public mutating func clearResult() {self._result = nil}
|
|
522
|
+
|
|
523
|
+
public var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
524
|
+
|
|
525
|
+
public init() {}
|
|
526
|
+
|
|
527
|
+
fileprivate var _result: BlueSPResult? = nil
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
/// Message sent by the server to the device as stream like APDUs
|
|
531
|
+
public struct BlueWebSPServerSocketMessage: Sendable {
|
|
532
|
+
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
|
533
|
+
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
|
534
|
+
// methods supported on all messages.
|
|
535
|
+
|
|
536
|
+
public var transactionID: UInt32 {
|
|
537
|
+
get {return _transactionID ?? 0}
|
|
538
|
+
set {_transactionID = newValue}
|
|
539
|
+
}
|
|
540
|
+
/// Returns true if `transactionID` has been explicitly set.
|
|
541
|
+
public var hasTransactionID: Bool {return self._transactionID != nil}
|
|
542
|
+
/// Clears the value of `transactionID`. Subsequent reads from it will return its default value.
|
|
543
|
+
public mutating func clearTransactionID() {self._transactionID = nil}
|
|
544
|
+
|
|
545
|
+
public var payload: BlueWebSPServerSocketMessage.OneOf_Payload? = nil
|
|
546
|
+
|
|
547
|
+
public var success: BlueWebSPServerSocketMessageSuccess {
|
|
548
|
+
get {
|
|
549
|
+
if case .success(let v)? = payload {return v}
|
|
550
|
+
return BlueWebSPServerSocketMessageSuccess()
|
|
551
|
+
}
|
|
552
|
+
set {payload = .success(newValue)}
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
public var failed: BlueWebSPServerSocketMessageFailed {
|
|
556
|
+
get {
|
|
557
|
+
if case .failed(let v)? = payload {return v}
|
|
558
|
+
return BlueWebSPServerSocketMessageFailed()
|
|
559
|
+
}
|
|
560
|
+
set {payload = .failed(newValue)}
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
public var done: BlueWebSPServerSocketMessageDone {
|
|
564
|
+
get {
|
|
565
|
+
if case .done(let v)? = payload {return v}
|
|
566
|
+
return BlueWebSPServerSocketMessageDone()
|
|
567
|
+
}
|
|
568
|
+
set {payload = .done(newValue)}
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
public var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
572
|
+
|
|
573
|
+
public enum OneOf_Payload: Equatable, Sendable {
|
|
574
|
+
case success(BlueWebSPServerSocketMessageSuccess)
|
|
575
|
+
case failed(BlueWebSPServerSocketMessageFailed)
|
|
576
|
+
case done(BlueWebSPServerSocketMessageDone)
|
|
577
|
+
|
|
578
|
+
fileprivate var isInitialized: Bool {
|
|
579
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
580
|
+
// allocates stack space for every case branch when no optimizations are
|
|
581
|
+
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
|
582
|
+
switch self {
|
|
583
|
+
case .success: return {
|
|
584
|
+
guard case .success(let v) = self else { preconditionFailure() }
|
|
585
|
+
return v.isInitialized
|
|
586
|
+
}()
|
|
587
|
+
case .failed: return {
|
|
588
|
+
guard case .failed(let v) = self else { preconditionFailure() }
|
|
589
|
+
return v.isInitialized
|
|
590
|
+
}()
|
|
591
|
+
case .done: return {
|
|
592
|
+
guard case .done(let v) = self else { preconditionFailure() }
|
|
593
|
+
return v.isInitialized
|
|
594
|
+
}()
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
public init() {}
|
|
601
|
+
|
|
602
|
+
fileprivate var _transactionID: UInt32? = nil
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
public struct BlueWebSPClientSocketMessageSuccess: Sendable {
|
|
606
|
+
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
|
607
|
+
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
|
608
|
+
// methods supported on all messages.
|
|
609
|
+
|
|
610
|
+
public var result: BlueSPResult {
|
|
611
|
+
get {return _result ?? BlueSPResult()}
|
|
612
|
+
set {_result = newValue}
|
|
613
|
+
}
|
|
614
|
+
/// Returns true if `result` has been explicitly set.
|
|
615
|
+
public var hasResult: Bool {return self._result != nil}
|
|
616
|
+
/// Clears the value of `result`. Subsequent reads from it will return its default value.
|
|
617
|
+
public mutating func clearResult() {self._result = nil}
|
|
618
|
+
|
|
619
|
+
public var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
620
|
+
|
|
621
|
+
public init() {}
|
|
622
|
+
|
|
623
|
+
fileprivate var _result: BlueSPResult? = nil
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
/// Message sent to the server by the device as stream like APDUs
|
|
627
|
+
public struct BlueWebSPClientSocketMessage: Sendable {
|
|
628
|
+
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
|
629
|
+
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
|
630
|
+
// methods supported on all messages.
|
|
631
|
+
|
|
632
|
+
public var payload: BlueWebSPClientSocketMessage.OneOf_Payload? = nil
|
|
633
|
+
|
|
634
|
+
public var success: BlueWebSPClientSocketMessageSuccess {
|
|
635
|
+
get {
|
|
636
|
+
if case .success(let v)? = payload {return v}
|
|
637
|
+
return BlueWebSPClientSocketMessageSuccess()
|
|
638
|
+
}
|
|
639
|
+
set {payload = .success(newValue)}
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
public var failed: BlueReturnCode {
|
|
643
|
+
get {
|
|
644
|
+
if case .failed(let v)? = payload {return v}
|
|
645
|
+
return .ok
|
|
646
|
+
}
|
|
647
|
+
set {payload = .failed(newValue)}
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
public var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
651
|
+
|
|
652
|
+
public enum OneOf_Payload: Equatable, Sendable {
|
|
653
|
+
case success(BlueWebSPClientSocketMessageSuccess)
|
|
654
|
+
case failed(BlueReturnCode)
|
|
655
|
+
|
|
656
|
+
fileprivate var isInitialized: Bool {
|
|
657
|
+
guard case .success(let v) = self else {return true}
|
|
658
|
+
return v.isInitialized
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
public init() {}
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
// MARK: - Code below here is support for the SwiftProtobuf runtime.
|
|
667
|
+
|
|
668
|
+
extension BlueTransponderId: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
669
|
+
public static let protoMessageName: String = "BlueTransponderId"
|
|
670
|
+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}id\0")
|
|
671
|
+
|
|
672
|
+
public var isInitialized: Bool {
|
|
673
|
+
if self._id == nil {return false}
|
|
674
|
+
return true
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
|
678
|
+
while let fieldNumber = try decoder.nextFieldNumber() {
|
|
679
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
680
|
+
// allocates stack space for every case branch when no optimizations are
|
|
681
|
+
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
|
682
|
+
switch fieldNumber {
|
|
683
|
+
case 1: try { try decoder.decodeSingularStringField(value: &self._id) }()
|
|
684
|
+
default: break
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
690
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
691
|
+
// allocates stack space for every if/case branch local when no optimizations
|
|
692
|
+
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
|
|
693
|
+
// https://github.com/apple/swift-protobuf/issues/1182
|
|
694
|
+
try { if let v = self._id {
|
|
695
|
+
try visitor.visitSingularStringField(value: v, fieldNumber: 1)
|
|
696
|
+
} }()
|
|
697
|
+
try unknownFields.traverse(visitor: &visitor)
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
public static func ==(lhs: BlueTransponderId, rhs: BlueTransponderId) -> Bool {
|
|
701
|
+
if lhs._id != rhs._id {return false}
|
|
702
|
+
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
703
|
+
return true
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
extension BlueErrorResult: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
708
|
+
public static let protoMessageName: String = "BlueErrorResult"
|
|
709
|
+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}data\0")
|
|
710
|
+
|
|
711
|
+
public var isInitialized: Bool {
|
|
712
|
+
if self._data == nil {return false}
|
|
713
|
+
return true
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
|
717
|
+
while let fieldNumber = try decoder.nextFieldNumber() {
|
|
718
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
719
|
+
// allocates stack space for every case branch when no optimizations are
|
|
720
|
+
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
|
721
|
+
switch fieldNumber {
|
|
722
|
+
case 1: try { try decoder.decodeSingularStringField(value: &self._data) }()
|
|
723
|
+
default: break
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
729
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
730
|
+
// allocates stack space for every if/case branch local when no optimizations
|
|
731
|
+
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
|
|
732
|
+
// https://github.com/apple/swift-protobuf/issues/1182
|
|
733
|
+
try { if let v = self._data {
|
|
734
|
+
try visitor.visitSingularStringField(value: v, fieldNumber: 1)
|
|
735
|
+
} }()
|
|
736
|
+
try unknownFields.traverse(visitor: &visitor)
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
public static func ==(lhs: BlueErrorResult, rhs: BlueErrorResult) -> Bool {
|
|
740
|
+
if lhs._data != rhs._data {return false}
|
|
741
|
+
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
742
|
+
return true
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
extension BlueWebSPHandshake: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
747
|
+
public static let protoMessageName: String = "BlueWebSPHandshake"
|
|
748
|
+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}salt\0")
|
|
749
|
+
|
|
750
|
+
public var isInitialized: Bool {
|
|
751
|
+
if self._salt == nil {return false}
|
|
752
|
+
return true
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
|
756
|
+
while let fieldNumber = try decoder.nextFieldNumber() {
|
|
757
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
758
|
+
// allocates stack space for every case branch when no optimizations are
|
|
759
|
+
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
|
760
|
+
switch fieldNumber {
|
|
761
|
+
case 1: try { try decoder.decodeSingularBytesField(value: &self._salt) }()
|
|
762
|
+
default: break
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
768
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
769
|
+
// allocates stack space for every if/case branch local when no optimizations
|
|
770
|
+
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
|
|
771
|
+
// https://github.com/apple/swift-protobuf/issues/1182
|
|
772
|
+
try { if let v = self._salt {
|
|
773
|
+
try visitor.visitSingularBytesField(value: v, fieldNumber: 1)
|
|
774
|
+
} }()
|
|
775
|
+
try unknownFields.traverse(visitor: &visitor)
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
public static func ==(lhs: BlueWebSPHandshake, rhs: BlueWebSPHandshake) -> Bool {
|
|
779
|
+
if lhs._salt != rhs._salt {return false}
|
|
780
|
+
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
781
|
+
return true
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
extension BlueWebSPHandshakeReply: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
786
|
+
public static let protoMessageName: String = "BlueWebSPHandshakeReply"
|
|
787
|
+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}deviceId\0\u{1}signature\0")
|
|
788
|
+
|
|
789
|
+
public var isInitialized: Bool {
|
|
790
|
+
if self._deviceID == nil {return false}
|
|
791
|
+
if self._signature == nil {return false}
|
|
792
|
+
return true
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
|
796
|
+
while let fieldNumber = try decoder.nextFieldNumber() {
|
|
797
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
798
|
+
// allocates stack space for every case branch when no optimizations are
|
|
799
|
+
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
|
800
|
+
switch fieldNumber {
|
|
801
|
+
case 1: try { try decoder.decodeSingularStringField(value: &self._deviceID) }()
|
|
802
|
+
case 2: try { try decoder.decodeSingularBytesField(value: &self._signature) }()
|
|
803
|
+
default: break
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
809
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
810
|
+
// allocates stack space for every if/case branch local when no optimizations
|
|
811
|
+
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
|
|
812
|
+
// https://github.com/apple/swift-protobuf/issues/1182
|
|
813
|
+
try { if let v = self._deviceID {
|
|
814
|
+
try visitor.visitSingularStringField(value: v, fieldNumber: 1)
|
|
815
|
+
} }()
|
|
816
|
+
try { if let v = self._signature {
|
|
817
|
+
try visitor.visitSingularBytesField(value: v, fieldNumber: 2)
|
|
818
|
+
} }()
|
|
819
|
+
try unknownFields.traverse(visitor: &visitor)
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
public static func ==(lhs: BlueWebSPHandshakeReply, rhs: BlueWebSPHandshakeReply) -> Bool {
|
|
823
|
+
if lhs._deviceID != rhs._deviceID {return false}
|
|
824
|
+
if lhs._signature != rhs._signature {return false}
|
|
825
|
+
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
826
|
+
return true
|
|
827
|
+
}
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
extension BlueWebSPMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
831
|
+
public static let protoMessageName: String = "BlueWebSPMessage"
|
|
832
|
+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}transactionId\0\u{1}payload\0\u{1}isContinued\0")
|
|
833
|
+
|
|
834
|
+
public var isInitialized: Bool {
|
|
835
|
+
if self._transactionID == nil {return false}
|
|
836
|
+
if self._payload == nil {return false}
|
|
837
|
+
if let v = self._payload, !v.isInitialized {return false}
|
|
838
|
+
return true
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
|
842
|
+
while let fieldNumber = try decoder.nextFieldNumber() {
|
|
843
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
844
|
+
// allocates stack space for every case branch when no optimizations are
|
|
845
|
+
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
|
846
|
+
switch fieldNumber {
|
|
847
|
+
case 1: try { try decoder.decodeSingularUInt32Field(value: &self._transactionID) }()
|
|
848
|
+
case 2: try { try decoder.decodeSingularMessageField(value: &self._payload) }()
|
|
849
|
+
case 3: try { try decoder.decodeSingularBoolField(value: &self._isContinued) }()
|
|
850
|
+
default: break
|
|
851
|
+
}
|
|
852
|
+
}
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
856
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
857
|
+
// allocates stack space for every if/case branch local when no optimizations
|
|
858
|
+
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
|
|
859
|
+
// https://github.com/apple/swift-protobuf/issues/1182
|
|
860
|
+
try { if let v = self._transactionID {
|
|
861
|
+
try visitor.visitSingularUInt32Field(value: v, fieldNumber: 1)
|
|
862
|
+
} }()
|
|
863
|
+
try { if let v = self._payload {
|
|
864
|
+
try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
|
|
865
|
+
} }()
|
|
866
|
+
try { if let v = self._isContinued {
|
|
867
|
+
try visitor.visitSingularBoolField(value: v, fieldNumber: 3)
|
|
868
|
+
} }()
|
|
869
|
+
try unknownFields.traverse(visitor: &visitor)
|
|
870
|
+
}
|
|
871
|
+
|
|
872
|
+
public static func ==(lhs: BlueWebSPMessage, rhs: BlueWebSPMessage) -> Bool {
|
|
873
|
+
if lhs._transactionID != rhs._transactionID {return false}
|
|
874
|
+
if lhs._payload != rhs._payload {return false}
|
|
875
|
+
if lhs._isContinued != rhs._isContinued {return false}
|
|
876
|
+
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
877
|
+
return true
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
extension BlueWebSPStatusMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
882
|
+
public static let protoMessageName: String = "BlueWebSPStatusMessage"
|
|
883
|
+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}status\0")
|
|
884
|
+
|
|
885
|
+
public var isInitialized: Bool {
|
|
886
|
+
if self._status == nil {return false}
|
|
887
|
+
return true
|
|
888
|
+
}
|
|
889
|
+
|
|
890
|
+
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
|
891
|
+
while let fieldNumber = try decoder.nextFieldNumber() {
|
|
892
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
893
|
+
// allocates stack space for every case branch when no optimizations are
|
|
894
|
+
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
|
895
|
+
switch fieldNumber {
|
|
896
|
+
case 1: try { try decoder.decodeSingularEnumField(value: &self._status) }()
|
|
897
|
+
default: break
|
|
898
|
+
}
|
|
899
|
+
}
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
903
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
904
|
+
// allocates stack space for every if/case branch local when no optimizations
|
|
905
|
+
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
|
|
906
|
+
// https://github.com/apple/swift-protobuf/issues/1182
|
|
907
|
+
try { if let v = self._status {
|
|
908
|
+
try visitor.visitSingularEnumField(value: v, fieldNumber: 1)
|
|
909
|
+
} }()
|
|
910
|
+
try unknownFields.traverse(visitor: &visitor)
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
public static func ==(lhs: BlueWebSPStatusMessage, rhs: BlueWebSPStatusMessage) -> Bool {
|
|
914
|
+
if lhs._status != rhs._status {return false}
|
|
915
|
+
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
916
|
+
return true
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
extension BlueSocketConfigurationResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
921
|
+
public static let protoMessageName: String = "BlueSocketConfigurationResponse"
|
|
922
|
+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}config\0\u{1}transponderId\0\u{1}error\0")
|
|
923
|
+
|
|
924
|
+
public var isInitialized: Bool {
|
|
925
|
+
if self._transponderID == nil {return false}
|
|
926
|
+
if self._config == nil {return false}
|
|
927
|
+
if let v = self._transponderID, !v.isInitialized {return false}
|
|
928
|
+
if let v = self._config, !v.isInitialized {return false}
|
|
929
|
+
if let v = self._error, !v.isInitialized {return false}
|
|
930
|
+
return true
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
|
934
|
+
while let fieldNumber = try decoder.nextFieldNumber() {
|
|
935
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
936
|
+
// allocates stack space for every case branch when no optimizations are
|
|
937
|
+
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
|
938
|
+
switch fieldNumber {
|
|
939
|
+
case 1: try { try decoder.decodeSingularMessageField(value: &self._config) }()
|
|
940
|
+
case 2: try { try decoder.decodeSingularMessageField(value: &self._transponderID) }()
|
|
941
|
+
case 3: try { try decoder.decodeSingularMessageField(value: &self._error) }()
|
|
942
|
+
default: break
|
|
943
|
+
}
|
|
944
|
+
}
|
|
945
|
+
}
|
|
946
|
+
|
|
947
|
+
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
948
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
949
|
+
// allocates stack space for every if/case branch local when no optimizations
|
|
950
|
+
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
|
|
951
|
+
// https://github.com/apple/swift-protobuf/issues/1182
|
|
952
|
+
try { if let v = self._config {
|
|
953
|
+
try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
|
|
954
|
+
} }()
|
|
955
|
+
try { if let v = self._transponderID {
|
|
956
|
+
try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
|
|
957
|
+
} }()
|
|
958
|
+
try { if let v = self._error {
|
|
959
|
+
try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
|
|
960
|
+
} }()
|
|
961
|
+
try unknownFields.traverse(visitor: &visitor)
|
|
962
|
+
}
|
|
963
|
+
|
|
964
|
+
public static func ==(lhs: BlueSocketConfigurationResponse, rhs: BlueSocketConfigurationResponse) -> Bool {
|
|
965
|
+
if lhs._transponderID != rhs._transponderID {return false}
|
|
966
|
+
if lhs._config != rhs._config {return false}
|
|
967
|
+
if lhs._error != rhs._error {return false}
|
|
968
|
+
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
969
|
+
return true
|
|
970
|
+
}
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
extension BlueSocketRequestConfiguration: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
974
|
+
public static let protoMessageName: String = "BlueSocketRequestConfiguration"
|
|
975
|
+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\u{2}transponderId\0\u{2}\u{2}aid\0")
|
|
976
|
+
|
|
977
|
+
public var isInitialized: Bool {
|
|
978
|
+
if self._transponderID == nil {return false}
|
|
979
|
+
if self._aid == nil {return false}
|
|
980
|
+
if let v = self._transponderID, !v.isInitialized {return false}
|
|
981
|
+
return true
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
|
985
|
+
while let fieldNumber = try decoder.nextFieldNumber() {
|
|
986
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
987
|
+
// allocates stack space for every case branch when no optimizations are
|
|
988
|
+
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
|
989
|
+
switch fieldNumber {
|
|
990
|
+
case 2: try { try decoder.decodeSingularMessageField(value: &self._transponderID) }()
|
|
991
|
+
case 4: try { try decoder.decodeSingularUInt32Field(value: &self._aid) }()
|
|
992
|
+
default: break
|
|
993
|
+
}
|
|
994
|
+
}
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
998
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
999
|
+
// allocates stack space for every if/case branch local when no optimizations
|
|
1000
|
+
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
|
|
1001
|
+
// https://github.com/apple/swift-protobuf/issues/1182
|
|
1002
|
+
try { if let v = self._transponderID {
|
|
1003
|
+
try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
|
|
1004
|
+
} }()
|
|
1005
|
+
try { if let v = self._aid {
|
|
1006
|
+
try visitor.visitSingularUInt32Field(value: v, fieldNumber: 4)
|
|
1007
|
+
} }()
|
|
1008
|
+
try unknownFields.traverse(visitor: &visitor)
|
|
1009
|
+
}
|
|
1010
|
+
|
|
1011
|
+
public static func ==(lhs: BlueSocketRequestConfiguration, rhs: BlueSocketRequestConfiguration) -> Bool {
|
|
1012
|
+
if lhs._transponderID != rhs._transponderID {return false}
|
|
1013
|
+
if lhs._aid != rhs._aid {return false}
|
|
1014
|
+
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
1015
|
+
return true
|
|
1016
|
+
}
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
extension BlueWebSPServerMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
1020
|
+
public static let protoMessageName: String = "BlueWebSPServerMessage"
|
|
1021
|
+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\u{2}handshake\0\u{1}command\0\u{1}ossSo\0\u{1}ossSid\0\u{1}configResponse\0\u{1}socketMessage\0")
|
|
1022
|
+
|
|
1023
|
+
public var isInitialized: Bool {
|
|
1024
|
+
if let v = self.payload, !v.isInitialized {return false}
|
|
1025
|
+
return true
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1028
|
+
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
|
1029
|
+
while let fieldNumber = try decoder.nextFieldNumber() {
|
|
1030
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
1031
|
+
// allocates stack space for every case branch when no optimizations are
|
|
1032
|
+
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
|
1033
|
+
switch fieldNumber {
|
|
1034
|
+
case 2: try {
|
|
1035
|
+
var v: BlueWebSPHandshake?
|
|
1036
|
+
var hadOneofValue = false
|
|
1037
|
+
if let current = self.payload {
|
|
1038
|
+
hadOneofValue = true
|
|
1039
|
+
if case .handshake(let m) = current {v = m}
|
|
1040
|
+
}
|
|
1041
|
+
try decoder.decodeSingularMessageField(value: &v)
|
|
1042
|
+
if let v = v {
|
|
1043
|
+
if hadOneofValue {try decoder.handleConflictingOneOf()}
|
|
1044
|
+
self.payload = .handshake(v)
|
|
1045
|
+
}
|
|
1046
|
+
}()
|
|
1047
|
+
case 3: try {
|
|
1048
|
+
var v: BlueSPTokenCommand?
|
|
1049
|
+
var hadOneofValue = false
|
|
1050
|
+
if let current = self.payload {
|
|
1051
|
+
hadOneofValue = true
|
|
1052
|
+
if case .command(let m) = current {v = m}
|
|
1053
|
+
}
|
|
1054
|
+
try decoder.decodeSingularMessageField(value: &v)
|
|
1055
|
+
if let v = v {
|
|
1056
|
+
if hadOneofValue {try decoder.handleConflictingOneOf()}
|
|
1057
|
+
self.payload = .command(v)
|
|
1058
|
+
}
|
|
1059
|
+
}()
|
|
1060
|
+
case 4: try {
|
|
1061
|
+
var v: BlueOssSoMobile?
|
|
1062
|
+
var hadOneofValue = false
|
|
1063
|
+
if let current = self.payload {
|
|
1064
|
+
hadOneofValue = true
|
|
1065
|
+
if case .ossSo(let m) = current {v = m}
|
|
1066
|
+
}
|
|
1067
|
+
try decoder.decodeSingularMessageField(value: &v)
|
|
1068
|
+
if let v = v {
|
|
1069
|
+
if hadOneofValue {try decoder.handleConflictingOneOf()}
|
|
1070
|
+
self.payload = .ossSo(v)
|
|
1071
|
+
}
|
|
1072
|
+
}()
|
|
1073
|
+
case 5: try {
|
|
1074
|
+
var v: BlueOssSidMobile?
|
|
1075
|
+
var hadOneofValue = false
|
|
1076
|
+
if let current = self.payload {
|
|
1077
|
+
hadOneofValue = true
|
|
1078
|
+
if case .ossSid(let m) = current {v = m}
|
|
1079
|
+
}
|
|
1080
|
+
try decoder.decodeSingularMessageField(value: &v)
|
|
1081
|
+
if let v = v {
|
|
1082
|
+
if hadOneofValue {try decoder.handleConflictingOneOf()}
|
|
1083
|
+
self.payload = .ossSid(v)
|
|
1084
|
+
}
|
|
1085
|
+
}()
|
|
1086
|
+
case 6: try {
|
|
1087
|
+
var v: BlueSocketConfigurationResponse?
|
|
1088
|
+
var hadOneofValue = false
|
|
1089
|
+
if let current = self.payload {
|
|
1090
|
+
hadOneofValue = true
|
|
1091
|
+
if case .configResponse(let m) = current {v = m}
|
|
1092
|
+
}
|
|
1093
|
+
try decoder.decodeSingularMessageField(value: &v)
|
|
1094
|
+
if let v = v {
|
|
1095
|
+
if hadOneofValue {try decoder.handleConflictingOneOf()}
|
|
1096
|
+
self.payload = .configResponse(v)
|
|
1097
|
+
}
|
|
1098
|
+
}()
|
|
1099
|
+
case 7: try {
|
|
1100
|
+
var v: BlueWebSPServerSocketMessage?
|
|
1101
|
+
var hadOneofValue = false
|
|
1102
|
+
if let current = self.payload {
|
|
1103
|
+
hadOneofValue = true
|
|
1104
|
+
if case .socketMessage(let m) = current {v = m}
|
|
1105
|
+
}
|
|
1106
|
+
try decoder.decodeSingularMessageField(value: &v)
|
|
1107
|
+
if let v = v {
|
|
1108
|
+
if hadOneofValue {try decoder.handleConflictingOneOf()}
|
|
1109
|
+
self.payload = .socketMessage(v)
|
|
1110
|
+
}
|
|
1111
|
+
}()
|
|
1112
|
+
default: break
|
|
1113
|
+
}
|
|
1114
|
+
}
|
|
1115
|
+
}
|
|
1116
|
+
|
|
1117
|
+
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
1118
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
1119
|
+
// allocates stack space for every if/case branch local when no optimizations
|
|
1120
|
+
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
|
|
1121
|
+
// https://github.com/apple/swift-protobuf/issues/1182
|
|
1122
|
+
switch self.payload {
|
|
1123
|
+
case .handshake?: try {
|
|
1124
|
+
guard case .handshake(let v)? = self.payload else { preconditionFailure() }
|
|
1125
|
+
try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
|
|
1126
|
+
}()
|
|
1127
|
+
case .command?: try {
|
|
1128
|
+
guard case .command(let v)? = self.payload else { preconditionFailure() }
|
|
1129
|
+
try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
|
|
1130
|
+
}()
|
|
1131
|
+
case .ossSo?: try {
|
|
1132
|
+
guard case .ossSo(let v)? = self.payload else { preconditionFailure() }
|
|
1133
|
+
try visitor.visitSingularMessageField(value: v, fieldNumber: 4)
|
|
1134
|
+
}()
|
|
1135
|
+
case .ossSid?: try {
|
|
1136
|
+
guard case .ossSid(let v)? = self.payload else { preconditionFailure() }
|
|
1137
|
+
try visitor.visitSingularMessageField(value: v, fieldNumber: 5)
|
|
1138
|
+
}()
|
|
1139
|
+
case .configResponse?: try {
|
|
1140
|
+
guard case .configResponse(let v)? = self.payload else { preconditionFailure() }
|
|
1141
|
+
try visitor.visitSingularMessageField(value: v, fieldNumber: 6)
|
|
1142
|
+
}()
|
|
1143
|
+
case .socketMessage?: try {
|
|
1144
|
+
guard case .socketMessage(let v)? = self.payload else { preconditionFailure() }
|
|
1145
|
+
try visitor.visitSingularMessageField(value: v, fieldNumber: 7)
|
|
1146
|
+
}()
|
|
1147
|
+
case nil: break
|
|
1148
|
+
}
|
|
1149
|
+
try unknownFields.traverse(visitor: &visitor)
|
|
1150
|
+
}
|
|
1151
|
+
|
|
1152
|
+
public static func ==(lhs: BlueWebSPServerMessage, rhs: BlueWebSPServerMessage) -> Bool {
|
|
1153
|
+
if lhs.payload != rhs.payload {return false}
|
|
1154
|
+
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
1155
|
+
return true
|
|
1156
|
+
}
|
|
1157
|
+
}
|
|
1158
|
+
|
|
1159
|
+
extension BlueWebSPClientRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
1160
|
+
public static let protoMessageName: String = "BlueWebSPClientRequest"
|
|
1161
|
+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}requestConfig\0")
|
|
1162
|
+
|
|
1163
|
+
public var isInitialized: Bool {
|
|
1164
|
+
if let v = self.payload, !v.isInitialized {return false}
|
|
1165
|
+
return true
|
|
1166
|
+
}
|
|
1167
|
+
|
|
1168
|
+
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
|
1169
|
+
while let fieldNumber = try decoder.nextFieldNumber() {
|
|
1170
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
1171
|
+
// allocates stack space for every case branch when no optimizations are
|
|
1172
|
+
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
|
1173
|
+
switch fieldNumber {
|
|
1174
|
+
case 1: try {
|
|
1175
|
+
var v: BlueSocketRequestConfiguration?
|
|
1176
|
+
var hadOneofValue = false
|
|
1177
|
+
if let current = self.payload {
|
|
1178
|
+
hadOneofValue = true
|
|
1179
|
+
if case .requestConfig(let m) = current {v = m}
|
|
1180
|
+
}
|
|
1181
|
+
try decoder.decodeSingularMessageField(value: &v)
|
|
1182
|
+
if let v = v {
|
|
1183
|
+
if hadOneofValue {try decoder.handleConflictingOneOf()}
|
|
1184
|
+
self.payload = .requestConfig(v)
|
|
1185
|
+
}
|
|
1186
|
+
}()
|
|
1187
|
+
default: break
|
|
1188
|
+
}
|
|
1189
|
+
}
|
|
1190
|
+
}
|
|
1191
|
+
|
|
1192
|
+
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
1193
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
1194
|
+
// allocates stack space for every if/case branch local when no optimizations
|
|
1195
|
+
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
|
|
1196
|
+
// https://github.com/apple/swift-protobuf/issues/1182
|
|
1197
|
+
try { if case .requestConfig(let v)? = self.payload {
|
|
1198
|
+
try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
|
|
1199
|
+
} }()
|
|
1200
|
+
try unknownFields.traverse(visitor: &visitor)
|
|
1201
|
+
}
|
|
1202
|
+
|
|
1203
|
+
public static func ==(lhs: BlueWebSPClientRequest, rhs: BlueWebSPClientRequest) -> Bool {
|
|
1204
|
+
if lhs.payload != rhs.payload {return false}
|
|
1205
|
+
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
1206
|
+
return true
|
|
1207
|
+
}
|
|
1208
|
+
}
|
|
1209
|
+
|
|
1210
|
+
extension BlueWebSPClientResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
1211
|
+
public static let protoMessageName: String = "BlueWebSPClientResponse"
|
|
1212
|
+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}message\0")
|
|
1213
|
+
|
|
1214
|
+
public var isInitialized: Bool {
|
|
1215
|
+
if let v = self.payload, !v.isInitialized {return false}
|
|
1216
|
+
return true
|
|
1217
|
+
}
|
|
1218
|
+
|
|
1219
|
+
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
|
1220
|
+
while let fieldNumber = try decoder.nextFieldNumber() {
|
|
1221
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
1222
|
+
// allocates stack space for every case branch when no optimizations are
|
|
1223
|
+
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
|
1224
|
+
switch fieldNumber {
|
|
1225
|
+
case 1: try {
|
|
1226
|
+
var v: BlueWebSPMessage?
|
|
1227
|
+
var hadOneofValue = false
|
|
1228
|
+
if let current = self.payload {
|
|
1229
|
+
hadOneofValue = true
|
|
1230
|
+
if case .message(let m) = current {v = m}
|
|
1231
|
+
}
|
|
1232
|
+
try decoder.decodeSingularMessageField(value: &v)
|
|
1233
|
+
if let v = v {
|
|
1234
|
+
if hadOneofValue {try decoder.handleConflictingOneOf()}
|
|
1235
|
+
self.payload = .message(v)
|
|
1236
|
+
}
|
|
1237
|
+
}()
|
|
1238
|
+
default: break
|
|
1239
|
+
}
|
|
1240
|
+
}
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
1244
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
1245
|
+
// allocates stack space for every if/case branch local when no optimizations
|
|
1246
|
+
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
|
|
1247
|
+
// https://github.com/apple/swift-protobuf/issues/1182
|
|
1248
|
+
try { if case .message(let v)? = self.payload {
|
|
1249
|
+
try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
|
|
1250
|
+
} }()
|
|
1251
|
+
try unknownFields.traverse(visitor: &visitor)
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
public static func ==(lhs: BlueWebSPClientResponse, rhs: BlueWebSPClientResponse) -> Bool {
|
|
1255
|
+
if lhs.payload != rhs.payload {return false}
|
|
1256
|
+
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
1257
|
+
return true
|
|
1258
|
+
}
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1261
|
+
extension BlueWebSPClientMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
1262
|
+
public static let protoMessageName: String = "BlueWebSPClientMessage"
|
|
1263
|
+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}request\0\u{1}response\0")
|
|
1264
|
+
|
|
1265
|
+
public var isInitialized: Bool {
|
|
1266
|
+
if let v = self.payload, !v.isInitialized {return false}
|
|
1267
|
+
return true
|
|
1268
|
+
}
|
|
1269
|
+
|
|
1270
|
+
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
|
1271
|
+
while let fieldNumber = try decoder.nextFieldNumber() {
|
|
1272
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
1273
|
+
// allocates stack space for every case branch when no optimizations are
|
|
1274
|
+
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
|
1275
|
+
switch fieldNumber {
|
|
1276
|
+
case 1: try {
|
|
1277
|
+
var v: BlueWebSPClientRequest?
|
|
1278
|
+
var hadOneofValue = false
|
|
1279
|
+
if let current = self.payload {
|
|
1280
|
+
hadOneofValue = true
|
|
1281
|
+
if case .request(let m) = current {v = m}
|
|
1282
|
+
}
|
|
1283
|
+
try decoder.decodeSingularMessageField(value: &v)
|
|
1284
|
+
if let v = v {
|
|
1285
|
+
if hadOneofValue {try decoder.handleConflictingOneOf()}
|
|
1286
|
+
self.payload = .request(v)
|
|
1287
|
+
}
|
|
1288
|
+
}()
|
|
1289
|
+
case 2: try {
|
|
1290
|
+
var v: BlueWebSPClientResponse?
|
|
1291
|
+
var hadOneofValue = false
|
|
1292
|
+
if let current = self.payload {
|
|
1293
|
+
hadOneofValue = true
|
|
1294
|
+
if case .response(let m) = current {v = m}
|
|
1295
|
+
}
|
|
1296
|
+
try decoder.decodeSingularMessageField(value: &v)
|
|
1297
|
+
if let v = v {
|
|
1298
|
+
if hadOneofValue {try decoder.handleConflictingOneOf()}
|
|
1299
|
+
self.payload = .response(v)
|
|
1300
|
+
}
|
|
1301
|
+
}()
|
|
1302
|
+
default: break
|
|
1303
|
+
}
|
|
1304
|
+
}
|
|
1305
|
+
}
|
|
1306
|
+
|
|
1307
|
+
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
1308
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
1309
|
+
// allocates stack space for every if/case branch local when no optimizations
|
|
1310
|
+
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
|
|
1311
|
+
// https://github.com/apple/swift-protobuf/issues/1182
|
|
1312
|
+
switch self.payload {
|
|
1313
|
+
case .request?: try {
|
|
1314
|
+
guard case .request(let v)? = self.payload else { preconditionFailure() }
|
|
1315
|
+
try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
|
|
1316
|
+
}()
|
|
1317
|
+
case .response?: try {
|
|
1318
|
+
guard case .response(let v)? = self.payload else { preconditionFailure() }
|
|
1319
|
+
try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
|
|
1320
|
+
}()
|
|
1321
|
+
case nil: break
|
|
1322
|
+
}
|
|
1323
|
+
try unknownFields.traverse(visitor: &visitor)
|
|
1324
|
+
}
|
|
1325
|
+
|
|
1326
|
+
public static func ==(lhs: BlueWebSPClientMessage, rhs: BlueWebSPClientMessage) -> Bool {
|
|
1327
|
+
if lhs.payload != rhs.payload {return false}
|
|
1328
|
+
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
1329
|
+
return true
|
|
1330
|
+
}
|
|
1331
|
+
}
|
|
1332
|
+
|
|
1333
|
+
extension BlueWebSPServerSocketMessageSuccess: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
1334
|
+
public static let protoMessageName: String = "BlueWebSPServerSocketMessageSuccess"
|
|
1335
|
+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}result\0")
|
|
1336
|
+
|
|
1337
|
+
public var isInitialized: Bool {
|
|
1338
|
+
if self._result == nil {return false}
|
|
1339
|
+
if let v = self._result, !v.isInitialized {return false}
|
|
1340
|
+
return true
|
|
1341
|
+
}
|
|
1342
|
+
|
|
1343
|
+
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
|
1344
|
+
while let fieldNumber = try decoder.nextFieldNumber() {
|
|
1345
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
1346
|
+
// allocates stack space for every case branch when no optimizations are
|
|
1347
|
+
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
|
1348
|
+
switch fieldNumber {
|
|
1349
|
+
case 1: try { try decoder.decodeSingularMessageField(value: &self._result) }()
|
|
1350
|
+
default: break
|
|
1351
|
+
}
|
|
1352
|
+
}
|
|
1353
|
+
}
|
|
1354
|
+
|
|
1355
|
+
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
1356
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
1357
|
+
// allocates stack space for every if/case branch local when no optimizations
|
|
1358
|
+
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
|
|
1359
|
+
// https://github.com/apple/swift-protobuf/issues/1182
|
|
1360
|
+
try { if let v = self._result {
|
|
1361
|
+
try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
|
|
1362
|
+
} }()
|
|
1363
|
+
try unknownFields.traverse(visitor: &visitor)
|
|
1364
|
+
}
|
|
1365
|
+
|
|
1366
|
+
public static func ==(lhs: BlueWebSPServerSocketMessageSuccess, rhs: BlueWebSPServerSocketMessageSuccess) -> Bool {
|
|
1367
|
+
if lhs._result != rhs._result {return false}
|
|
1368
|
+
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
1369
|
+
return true
|
|
1370
|
+
}
|
|
1371
|
+
}
|
|
1372
|
+
|
|
1373
|
+
extension BlueWebSPServerSocketMessageFailed: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
1374
|
+
public static let protoMessageName: String = "BlueWebSPServerSocketMessageFailed"
|
|
1375
|
+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}result\0")
|
|
1376
|
+
|
|
1377
|
+
public var isInitialized: Bool {
|
|
1378
|
+
if self._result == nil {return false}
|
|
1379
|
+
if let v = self._result, !v.isInitialized {return false}
|
|
1380
|
+
return true
|
|
1381
|
+
}
|
|
1382
|
+
|
|
1383
|
+
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
|
1384
|
+
while let fieldNumber = try decoder.nextFieldNumber() {
|
|
1385
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
1386
|
+
// allocates stack space for every case branch when no optimizations are
|
|
1387
|
+
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
|
1388
|
+
switch fieldNumber {
|
|
1389
|
+
case 1: try { try decoder.decodeSingularMessageField(value: &self._result) }()
|
|
1390
|
+
default: break
|
|
1391
|
+
}
|
|
1392
|
+
}
|
|
1393
|
+
}
|
|
1394
|
+
|
|
1395
|
+
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
1396
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
1397
|
+
// allocates stack space for every if/case branch local when no optimizations
|
|
1398
|
+
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
|
|
1399
|
+
// https://github.com/apple/swift-protobuf/issues/1182
|
|
1400
|
+
try { if let v = self._result {
|
|
1401
|
+
try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
|
|
1402
|
+
} }()
|
|
1403
|
+
try unknownFields.traverse(visitor: &visitor)
|
|
1404
|
+
}
|
|
1405
|
+
|
|
1406
|
+
public static func ==(lhs: BlueWebSPServerSocketMessageFailed, rhs: BlueWebSPServerSocketMessageFailed) -> Bool {
|
|
1407
|
+
if lhs._result != rhs._result {return false}
|
|
1408
|
+
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
1409
|
+
return true
|
|
1410
|
+
}
|
|
1411
|
+
}
|
|
1412
|
+
|
|
1413
|
+
extension BlueWebSPServerSocketMessageDone: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
1414
|
+
public static let protoMessageName: String = "BlueWebSPServerSocketMessageDone"
|
|
1415
|
+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}result\0")
|
|
1416
|
+
|
|
1417
|
+
public var isInitialized: Bool {
|
|
1418
|
+
if let v = self._result, !v.isInitialized {return false}
|
|
1419
|
+
return true
|
|
1420
|
+
}
|
|
1421
|
+
|
|
1422
|
+
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
|
1423
|
+
while let fieldNumber = try decoder.nextFieldNumber() {
|
|
1424
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
1425
|
+
// allocates stack space for every case branch when no optimizations are
|
|
1426
|
+
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
|
1427
|
+
switch fieldNumber {
|
|
1428
|
+
case 1: try { try decoder.decodeSingularMessageField(value: &self._result) }()
|
|
1429
|
+
default: break
|
|
1430
|
+
}
|
|
1431
|
+
}
|
|
1432
|
+
}
|
|
1433
|
+
|
|
1434
|
+
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
1435
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
1436
|
+
// allocates stack space for every if/case branch local when no optimizations
|
|
1437
|
+
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
|
|
1438
|
+
// https://github.com/apple/swift-protobuf/issues/1182
|
|
1439
|
+
try { if let v = self._result {
|
|
1440
|
+
try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
|
|
1441
|
+
} }()
|
|
1442
|
+
try unknownFields.traverse(visitor: &visitor)
|
|
1443
|
+
}
|
|
1444
|
+
|
|
1445
|
+
public static func ==(lhs: BlueWebSPServerSocketMessageDone, rhs: BlueWebSPServerSocketMessageDone) -> Bool {
|
|
1446
|
+
if lhs._result != rhs._result {return false}
|
|
1447
|
+
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
1448
|
+
return true
|
|
1449
|
+
}
|
|
1450
|
+
}
|
|
1451
|
+
|
|
1452
|
+
extension BlueWebSPServerSocketMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
1453
|
+
public static let protoMessageName: String = "BlueWebSPServerSocketMessage"
|
|
1454
|
+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}transactionId\0\u{1}success\0\u{1}failed\0\u{1}done\0")
|
|
1455
|
+
|
|
1456
|
+
public var isInitialized: Bool {
|
|
1457
|
+
if self._transactionID == nil {return false}
|
|
1458
|
+
if let v = self.payload, !v.isInitialized {return false}
|
|
1459
|
+
return true
|
|
1460
|
+
}
|
|
1461
|
+
|
|
1462
|
+
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
|
1463
|
+
while let fieldNumber = try decoder.nextFieldNumber() {
|
|
1464
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
1465
|
+
// allocates stack space for every case branch when no optimizations are
|
|
1466
|
+
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
|
1467
|
+
switch fieldNumber {
|
|
1468
|
+
case 1: try { try decoder.decodeSingularUInt32Field(value: &self._transactionID) }()
|
|
1469
|
+
case 2: try {
|
|
1470
|
+
var v: BlueWebSPServerSocketMessageSuccess?
|
|
1471
|
+
var hadOneofValue = false
|
|
1472
|
+
if let current = self.payload {
|
|
1473
|
+
hadOneofValue = true
|
|
1474
|
+
if case .success(let m) = current {v = m}
|
|
1475
|
+
}
|
|
1476
|
+
try decoder.decodeSingularMessageField(value: &v)
|
|
1477
|
+
if let v = v {
|
|
1478
|
+
if hadOneofValue {try decoder.handleConflictingOneOf()}
|
|
1479
|
+
self.payload = .success(v)
|
|
1480
|
+
}
|
|
1481
|
+
}()
|
|
1482
|
+
case 3: try {
|
|
1483
|
+
var v: BlueWebSPServerSocketMessageFailed?
|
|
1484
|
+
var hadOneofValue = false
|
|
1485
|
+
if let current = self.payload {
|
|
1486
|
+
hadOneofValue = true
|
|
1487
|
+
if case .failed(let m) = current {v = m}
|
|
1488
|
+
}
|
|
1489
|
+
try decoder.decodeSingularMessageField(value: &v)
|
|
1490
|
+
if let v = v {
|
|
1491
|
+
if hadOneofValue {try decoder.handleConflictingOneOf()}
|
|
1492
|
+
self.payload = .failed(v)
|
|
1493
|
+
}
|
|
1494
|
+
}()
|
|
1495
|
+
case 4: try {
|
|
1496
|
+
var v: BlueWebSPServerSocketMessageDone?
|
|
1497
|
+
var hadOneofValue = false
|
|
1498
|
+
if let current = self.payload {
|
|
1499
|
+
hadOneofValue = true
|
|
1500
|
+
if case .done(let m) = current {v = m}
|
|
1501
|
+
}
|
|
1502
|
+
try decoder.decodeSingularMessageField(value: &v)
|
|
1503
|
+
if let v = v {
|
|
1504
|
+
if hadOneofValue {try decoder.handleConflictingOneOf()}
|
|
1505
|
+
self.payload = .done(v)
|
|
1506
|
+
}
|
|
1507
|
+
}()
|
|
1508
|
+
default: break
|
|
1509
|
+
}
|
|
1510
|
+
}
|
|
1511
|
+
}
|
|
1512
|
+
|
|
1513
|
+
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
1514
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
1515
|
+
// allocates stack space for every if/case branch local when no optimizations
|
|
1516
|
+
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
|
|
1517
|
+
// https://github.com/apple/swift-protobuf/issues/1182
|
|
1518
|
+
try { if let v = self._transactionID {
|
|
1519
|
+
try visitor.visitSingularUInt32Field(value: v, fieldNumber: 1)
|
|
1520
|
+
} }()
|
|
1521
|
+
switch self.payload {
|
|
1522
|
+
case .success?: try {
|
|
1523
|
+
guard case .success(let v)? = self.payload else { preconditionFailure() }
|
|
1524
|
+
try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
|
|
1525
|
+
}()
|
|
1526
|
+
case .failed?: try {
|
|
1527
|
+
guard case .failed(let v)? = self.payload else { preconditionFailure() }
|
|
1528
|
+
try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
|
|
1529
|
+
}()
|
|
1530
|
+
case .done?: try {
|
|
1531
|
+
guard case .done(let v)? = self.payload else { preconditionFailure() }
|
|
1532
|
+
try visitor.visitSingularMessageField(value: v, fieldNumber: 4)
|
|
1533
|
+
}()
|
|
1534
|
+
case nil: break
|
|
1535
|
+
}
|
|
1536
|
+
try unknownFields.traverse(visitor: &visitor)
|
|
1537
|
+
}
|
|
1538
|
+
|
|
1539
|
+
public static func ==(lhs: BlueWebSPServerSocketMessage, rhs: BlueWebSPServerSocketMessage) -> Bool {
|
|
1540
|
+
if lhs._transactionID != rhs._transactionID {return false}
|
|
1541
|
+
if lhs.payload != rhs.payload {return false}
|
|
1542
|
+
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
1543
|
+
return true
|
|
1544
|
+
}
|
|
1545
|
+
}
|
|
1546
|
+
|
|
1547
|
+
extension BlueWebSPClientSocketMessageSuccess: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
1548
|
+
public static let protoMessageName: String = "BlueWebSPClientSocketMessageSuccess"
|
|
1549
|
+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}result\0")
|
|
1550
|
+
|
|
1551
|
+
public var isInitialized: Bool {
|
|
1552
|
+
if self._result == nil {return false}
|
|
1553
|
+
if let v = self._result, !v.isInitialized {return false}
|
|
1554
|
+
return true
|
|
1555
|
+
}
|
|
1556
|
+
|
|
1557
|
+
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
|
1558
|
+
while let fieldNumber = try decoder.nextFieldNumber() {
|
|
1559
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
1560
|
+
// allocates stack space for every case branch when no optimizations are
|
|
1561
|
+
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
|
1562
|
+
switch fieldNumber {
|
|
1563
|
+
case 1: try { try decoder.decodeSingularMessageField(value: &self._result) }()
|
|
1564
|
+
default: break
|
|
1565
|
+
}
|
|
1566
|
+
}
|
|
1567
|
+
}
|
|
1568
|
+
|
|
1569
|
+
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
1570
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
1571
|
+
// allocates stack space for every if/case branch local when no optimizations
|
|
1572
|
+
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
|
|
1573
|
+
// https://github.com/apple/swift-protobuf/issues/1182
|
|
1574
|
+
try { if let v = self._result {
|
|
1575
|
+
try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
|
|
1576
|
+
} }()
|
|
1577
|
+
try unknownFields.traverse(visitor: &visitor)
|
|
1578
|
+
}
|
|
1579
|
+
|
|
1580
|
+
public static func ==(lhs: BlueWebSPClientSocketMessageSuccess, rhs: BlueWebSPClientSocketMessageSuccess) -> Bool {
|
|
1581
|
+
if lhs._result != rhs._result {return false}
|
|
1582
|
+
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
1583
|
+
return true
|
|
1584
|
+
}
|
|
1585
|
+
}
|
|
1586
|
+
|
|
1587
|
+
extension BlueWebSPClientSocketMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
1588
|
+
public static let protoMessageName: String = "BlueWebSPClientSocketMessage"
|
|
1589
|
+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}success\0\u{1}failed\0")
|
|
1590
|
+
|
|
1591
|
+
public var isInitialized: Bool {
|
|
1592
|
+
if let v = self.payload, !v.isInitialized {return false}
|
|
1593
|
+
return true
|
|
1594
|
+
}
|
|
1595
|
+
|
|
1596
|
+
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
|
1597
|
+
while let fieldNumber = try decoder.nextFieldNumber() {
|
|
1598
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
1599
|
+
// allocates stack space for every case branch when no optimizations are
|
|
1600
|
+
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
|
1601
|
+
switch fieldNumber {
|
|
1602
|
+
case 1: try {
|
|
1603
|
+
var v: BlueWebSPClientSocketMessageSuccess?
|
|
1604
|
+
var hadOneofValue = false
|
|
1605
|
+
if let current = self.payload {
|
|
1606
|
+
hadOneofValue = true
|
|
1607
|
+
if case .success(let m) = current {v = m}
|
|
1608
|
+
}
|
|
1609
|
+
try decoder.decodeSingularMessageField(value: &v)
|
|
1610
|
+
if let v = v {
|
|
1611
|
+
if hadOneofValue {try decoder.handleConflictingOneOf()}
|
|
1612
|
+
self.payload = .success(v)
|
|
1613
|
+
}
|
|
1614
|
+
}()
|
|
1615
|
+
case 2: try {
|
|
1616
|
+
var v: BlueReturnCode?
|
|
1617
|
+
try decoder.decodeSingularEnumField(value: &v)
|
|
1618
|
+
if let v = v {
|
|
1619
|
+
if self.payload != nil {try decoder.handleConflictingOneOf()}
|
|
1620
|
+
self.payload = .failed(v)
|
|
1621
|
+
}
|
|
1622
|
+
}()
|
|
1623
|
+
default: break
|
|
1624
|
+
}
|
|
1625
|
+
}
|
|
1626
|
+
}
|
|
1627
|
+
|
|
1628
|
+
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
1629
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
1630
|
+
// allocates stack space for every if/case branch local when no optimizations
|
|
1631
|
+
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
|
|
1632
|
+
// https://github.com/apple/swift-protobuf/issues/1182
|
|
1633
|
+
switch self.payload {
|
|
1634
|
+
case .success?: try {
|
|
1635
|
+
guard case .success(let v)? = self.payload else { preconditionFailure() }
|
|
1636
|
+
try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
|
|
1637
|
+
}()
|
|
1638
|
+
case .failed?: try {
|
|
1639
|
+
guard case .failed(let v)? = self.payload else { preconditionFailure() }
|
|
1640
|
+
try visitor.visitSingularEnumField(value: v, fieldNumber: 2)
|
|
1641
|
+
}()
|
|
1642
|
+
case nil: break
|
|
1643
|
+
}
|
|
1644
|
+
try unknownFields.traverse(visitor: &visitor)
|
|
1645
|
+
}
|
|
1646
|
+
|
|
1647
|
+
public static func ==(lhs: BlueWebSPClientSocketMessage, rhs: BlueWebSPClientSocketMessage) -> Bool {
|
|
1648
|
+
if lhs.payload != rhs.payload {return false}
|
|
1649
|
+
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
1650
|
+
return true
|
|
1651
|
+
}
|
|
1652
|
+
}
|