@pulsefield/protocol 0.0.2 → 0.0.3
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/PROTOCOL_GUIDELINES.md +123 -0
- package/Package.swift +34 -0
- package/README.md +92 -4
- package/buf.yaml +1 -1
- package/docs/session-scope.md +27 -0
- package/gen/python/pulsefield/protocol/py.typed +1 -0
- package/gen/python/pulsefield/protocol/v1/core_pb2.py +34 -0
- package/gen/python/pulsefield/protocol/v1/core_pb2.pyi +76 -0
- package/gen/python/pulsefield/protocol/v1/envelope_pb2.py +6 -23
- package/gen/python/pulsefield/protocol/v1/envelope_pb2.pyi +26 -105
- package/gen/python/pulsefield/protocol/v1/inference_pb2.py +48 -0
- package/gen/python/pulsefield/protocol/v1/inference_pb2.pyi +160 -0
- package/gen/python/pulsefield/protocol/v1/mapper_pb2.py +28 -0
- package/gen/python/pulsefield/protocol/v1/mapper_pb2.pyi +23 -0
- package/gen/swift/pulsefield/protocol/v1/core.pb.swift +323 -0
- package/gen/swift/pulsefield/protocol/v1/envelope.pb.swift +335 -671
- package/gen/swift/pulsefield/protocol/v1/inference.pb.swift +929 -0
- package/gen/swift/pulsefield/protocol/v1/mapper.pb.swift +143 -0
- package/package.json +17 -11
- package/proto/pulsefield/protocol/v1/core.proto +57 -0
- package/proto/pulsefield/protocol/v1/envelope.proto +30 -58
- package/proto/pulsefield/protocol/v1/inference.proto +145 -0
- package/proto/pulsefield/protocol/v1/mapper.proto +17 -0
- package/pyproject.toml +38 -0
- package/tools/check-generated.mjs +222 -0
- package/tools/check-python-package.mjs +63 -0
- package/tools/ensure-python-typed.mjs +10 -0
- package/fixtures/json/v1/audio-request.json +0 -12
- package/fixtures/json/v1/hit-object-token-event.json +0 -9
|
@@ -0,0 +1,929 @@
|
|
|
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: pulsefield/protocol/v1/inference.proto
|
|
7
|
+
//
|
|
8
|
+
// For information on using the generated types, please see the documentation:
|
|
9
|
+
// https://github.com/apple/swift-protobuf/
|
|
10
|
+
|
|
11
|
+
import SwiftProtobuf
|
|
12
|
+
|
|
13
|
+
// If the compiler emits an error on this type, it is because this file
|
|
14
|
+
// was generated by a version of the `protoc` Swift plug-in that is
|
|
15
|
+
// incompatible with the version of SwiftProtobuf to which you are linking.
|
|
16
|
+
// Please ensure that you are building against the same version of the API
|
|
17
|
+
// that was used to generate this file.
|
|
18
|
+
fileprivate nonisolated struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
|
|
19
|
+
struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
|
|
20
|
+
typealias Version = _2
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
public nonisolated enum Pulsefield_Protocol_V1_SyncSource: SwiftProtobuf.Enum, Swift.CaseIterable {
|
|
24
|
+
public typealias RawValue = Int
|
|
25
|
+
case unspecified // = 0
|
|
26
|
+
case background // = 1
|
|
27
|
+
case systemAudio // = 2
|
|
28
|
+
case UNRECOGNIZED(Int)
|
|
29
|
+
|
|
30
|
+
public init() {
|
|
31
|
+
self = .unspecified
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
public init?(rawValue: Int) {
|
|
35
|
+
switch rawValue {
|
|
36
|
+
case 0: self = .unspecified
|
|
37
|
+
case 1: self = .background
|
|
38
|
+
case 2: self = .systemAudio
|
|
39
|
+
default: self = .UNRECOGNIZED(rawValue)
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
public var rawValue: Int {
|
|
44
|
+
switch self {
|
|
45
|
+
case .unspecified: return 0
|
|
46
|
+
case .background: return 1
|
|
47
|
+
case .systemAudio: return 2
|
|
48
|
+
case .UNRECOGNIZED(let i): return i
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
|
53
|
+
public static let allCases: [Pulsefield_Protocol_V1_SyncSource] = [
|
|
54
|
+
.unspecified,
|
|
55
|
+
.background,
|
|
56
|
+
.systemAudio,
|
|
57
|
+
]
|
|
58
|
+
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
public nonisolated enum Pulsefield_Protocol_V1_InferenceRoute: SwiftProtobuf.Enum, Swift.CaseIterable {
|
|
62
|
+
public typealias RawValue = Int
|
|
63
|
+
case unspecified // = 0
|
|
64
|
+
case mapper // = 1
|
|
65
|
+
|
|
66
|
+
/// Timing-only route selected by the legacy JSON is_mock/isMock flag.
|
|
67
|
+
case timingMock // = 2
|
|
68
|
+
case UNRECOGNIZED(Int)
|
|
69
|
+
|
|
70
|
+
public init() {
|
|
71
|
+
self = .unspecified
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
public init?(rawValue: Int) {
|
|
75
|
+
switch rawValue {
|
|
76
|
+
case 0: self = .unspecified
|
|
77
|
+
case 1: self = .mapper
|
|
78
|
+
case 2: self = .timingMock
|
|
79
|
+
default: self = .UNRECOGNIZED(rawValue)
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
public var rawValue: Int {
|
|
84
|
+
switch self {
|
|
85
|
+
case .unspecified: return 0
|
|
86
|
+
case .mapper: return 1
|
|
87
|
+
case .timingMock: return 2
|
|
88
|
+
case .UNRECOGNIZED(let i): return i
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
|
93
|
+
public static let allCases: [Pulsefield_Protocol_V1_InferenceRoute] = [
|
|
94
|
+
.unspecified,
|
|
95
|
+
.mapper,
|
|
96
|
+
.timingMock,
|
|
97
|
+
]
|
|
98
|
+
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
public nonisolated enum Pulsefield_Protocol_V1_EndpointStatus: SwiftProtobuf.Enum, Swift.CaseIterable {
|
|
102
|
+
public typealias RawValue = Int
|
|
103
|
+
case unspecified // = 0
|
|
104
|
+
case ready // = 1
|
|
105
|
+
case audioPreparing // = 2
|
|
106
|
+
case audioReady // = 3
|
|
107
|
+
case streaming // = 4
|
|
108
|
+
case stopped // = 5
|
|
109
|
+
case failed // = 6
|
|
110
|
+
|
|
111
|
+
/// Endpoint has not completed initial readiness startup.
|
|
112
|
+
case cold // = 7
|
|
113
|
+
|
|
114
|
+
/// No active session exists for the envelope session_id.
|
|
115
|
+
case noSession // = 8
|
|
116
|
+
case UNRECOGNIZED(Int)
|
|
117
|
+
|
|
118
|
+
public init() {
|
|
119
|
+
self = .unspecified
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
public init?(rawValue: Int) {
|
|
123
|
+
switch rawValue {
|
|
124
|
+
case 0: self = .unspecified
|
|
125
|
+
case 1: self = .ready
|
|
126
|
+
case 2: self = .audioPreparing
|
|
127
|
+
case 3: self = .audioReady
|
|
128
|
+
case 4: self = .streaming
|
|
129
|
+
case 5: self = .stopped
|
|
130
|
+
case 6: self = .failed
|
|
131
|
+
case 7: self = .cold
|
|
132
|
+
case 8: self = .noSession
|
|
133
|
+
default: self = .UNRECOGNIZED(rawValue)
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
public var rawValue: Int {
|
|
138
|
+
switch self {
|
|
139
|
+
case .unspecified: return 0
|
|
140
|
+
case .ready: return 1
|
|
141
|
+
case .audioPreparing: return 2
|
|
142
|
+
case .audioReady: return 3
|
|
143
|
+
case .streaming: return 4
|
|
144
|
+
case .stopped: return 5
|
|
145
|
+
case .failed: return 6
|
|
146
|
+
case .cold: return 7
|
|
147
|
+
case .noSession: return 8
|
|
148
|
+
case .UNRECOGNIZED(let i): return i
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
|
153
|
+
public static let allCases: [Pulsefield_Protocol_V1_EndpointStatus] = [
|
|
154
|
+
.unspecified,
|
|
155
|
+
.ready,
|
|
156
|
+
.audioPreparing,
|
|
157
|
+
.audioReady,
|
|
158
|
+
.streaming,
|
|
159
|
+
.stopped,
|
|
160
|
+
.failed,
|
|
161
|
+
.cold,
|
|
162
|
+
.noSession,
|
|
163
|
+
]
|
|
164
|
+
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
public nonisolated enum Pulsefield_Protocol_V1_InferenceErrorCode: SwiftProtobuf.Enum, Swift.CaseIterable {
|
|
168
|
+
public typealias RawValue = Int
|
|
169
|
+
case unspecified // = 0
|
|
170
|
+
case protocolError // = 1
|
|
171
|
+
case invalidDevice // = 2
|
|
172
|
+
case audioNotFound // = 3
|
|
173
|
+
case inferenceFailed // = 4
|
|
174
|
+
case sessionNotFound // = 5
|
|
175
|
+
case sessionOwnershipConflict // = 6
|
|
176
|
+
case audioNotPrepared // = 7
|
|
177
|
+
case unsupportedRoute // = 8
|
|
178
|
+
case UNRECOGNIZED(Int)
|
|
179
|
+
|
|
180
|
+
public init() {
|
|
181
|
+
self = .unspecified
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
public init?(rawValue: Int) {
|
|
185
|
+
switch rawValue {
|
|
186
|
+
case 0: self = .unspecified
|
|
187
|
+
case 1: self = .protocolError
|
|
188
|
+
case 2: self = .invalidDevice
|
|
189
|
+
case 3: self = .audioNotFound
|
|
190
|
+
case 4: self = .inferenceFailed
|
|
191
|
+
case 5: self = .sessionNotFound
|
|
192
|
+
case 6: self = .sessionOwnershipConflict
|
|
193
|
+
case 7: self = .audioNotPrepared
|
|
194
|
+
case 8: self = .unsupportedRoute
|
|
195
|
+
default: self = .UNRECOGNIZED(rawValue)
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
public var rawValue: Int {
|
|
200
|
+
switch self {
|
|
201
|
+
case .unspecified: return 0
|
|
202
|
+
case .protocolError: return 1
|
|
203
|
+
case .invalidDevice: return 2
|
|
204
|
+
case .audioNotFound: return 3
|
|
205
|
+
case .inferenceFailed: return 4
|
|
206
|
+
case .sessionNotFound: return 5
|
|
207
|
+
case .sessionOwnershipConflict: return 6
|
|
208
|
+
case .audioNotPrepared: return 7
|
|
209
|
+
case .unsupportedRoute: return 8
|
|
210
|
+
case .UNRECOGNIZED(let i): return i
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
|
215
|
+
public static let allCases: [Pulsefield_Protocol_V1_InferenceErrorCode] = [
|
|
216
|
+
.unspecified,
|
|
217
|
+
.protocolError,
|
|
218
|
+
.invalidDevice,
|
|
219
|
+
.audioNotFound,
|
|
220
|
+
.inferenceFailed,
|
|
221
|
+
.sessionNotFound,
|
|
222
|
+
.sessionOwnershipConflict,
|
|
223
|
+
.audioNotPrepared,
|
|
224
|
+
.unsupportedRoute,
|
|
225
|
+
]
|
|
226
|
+
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/// Sent by a client to ask the endpoint to load models and become ready.
|
|
230
|
+
public nonisolated struct Pulsefield_Protocol_V1_ReadyRequest: Sendable {
|
|
231
|
+
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
|
232
|
+
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
|
233
|
+
// methods supported on all messages.
|
|
234
|
+
|
|
235
|
+
public var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
236
|
+
|
|
237
|
+
public init() {}
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
public nonisolated struct Pulsefield_Protocol_V1_AudioAssetRef: Sendable {
|
|
241
|
+
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
|
242
|
+
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
|
243
|
+
// methods supported on all messages.
|
|
244
|
+
|
|
245
|
+
public var ref: Pulsefield_Protocol_V1_AudioAssetRef.OneOf_Ref? = nil
|
|
246
|
+
|
|
247
|
+
public var localPath: String {
|
|
248
|
+
get {
|
|
249
|
+
if case .localPath(let v)? = ref {return v}
|
|
250
|
+
return String()
|
|
251
|
+
}
|
|
252
|
+
set {ref = .localPath(newValue)}
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
public var uri: String {
|
|
256
|
+
get {
|
|
257
|
+
if case .uri(let v)? = ref {return v}
|
|
258
|
+
return String()
|
|
259
|
+
}
|
|
260
|
+
set {ref = .uri(newValue)}
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
public var assetID: String {
|
|
264
|
+
get {
|
|
265
|
+
if case .assetID(let v)? = ref {return v}
|
|
266
|
+
return String()
|
|
267
|
+
}
|
|
268
|
+
set {ref = .assetID(newValue)}
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
public var audioLengthMs: UInt32 {
|
|
272
|
+
get {_audioLengthMs ?? 0}
|
|
273
|
+
set {_audioLengthMs = newValue}
|
|
274
|
+
}
|
|
275
|
+
/// Returns true if `audioLengthMs` has been explicitly set.
|
|
276
|
+
public var hasAudioLengthMs: Bool {self._audioLengthMs != nil}
|
|
277
|
+
/// Clears the value of `audioLengthMs`. Subsequent reads from it will return its default value.
|
|
278
|
+
public mutating func clearAudioLengthMs() {self._audioLengthMs = nil}
|
|
279
|
+
|
|
280
|
+
public var sha256Hex: String {
|
|
281
|
+
get {_sha256Hex ?? String()}
|
|
282
|
+
set {_sha256Hex = newValue}
|
|
283
|
+
}
|
|
284
|
+
/// Returns true if `sha256Hex` has been explicitly set.
|
|
285
|
+
public var hasSha256Hex: Bool {self._sha256Hex != nil}
|
|
286
|
+
/// Clears the value of `sha256Hex`. Subsequent reads from it will return its default value.
|
|
287
|
+
public mutating func clearSha256Hex() {self._sha256Hex = nil}
|
|
288
|
+
|
|
289
|
+
public var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
290
|
+
|
|
291
|
+
public nonisolated enum OneOf_Ref: Equatable, Sendable {
|
|
292
|
+
case localPath(String)
|
|
293
|
+
case uri(String)
|
|
294
|
+
case assetID(String)
|
|
295
|
+
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
public init() {}
|
|
299
|
+
|
|
300
|
+
fileprivate var _audioLengthMs: UInt32? = nil
|
|
301
|
+
fileprivate var _sha256Hex: String? = nil
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
public nonisolated struct Pulsefield_Protocol_V1_AudioRequest: Sendable {
|
|
305
|
+
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
|
306
|
+
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
|
307
|
+
// methods supported on all messages.
|
|
308
|
+
|
|
309
|
+
public var audio: Pulsefield_Protocol_V1_AudioAssetRef {
|
|
310
|
+
get {_audio ?? Pulsefield_Protocol_V1_AudioAssetRef()}
|
|
311
|
+
set {_audio = newValue}
|
|
312
|
+
}
|
|
313
|
+
/// Returns true if `audio` has been explicitly set.
|
|
314
|
+
public var hasAudio: Bool {self._audio != nil}
|
|
315
|
+
/// Clears the value of `audio`. Subsequent reads from it will return its default value.
|
|
316
|
+
public mutating func clearAudio() {self._audio = nil}
|
|
317
|
+
|
|
318
|
+
public var syncSource: Pulsefield_Protocol_V1_SyncSource = .unspecified
|
|
319
|
+
|
|
320
|
+
public var difficulty: Double {
|
|
321
|
+
get {_difficulty ?? 0}
|
|
322
|
+
set {_difficulty = newValue}
|
|
323
|
+
}
|
|
324
|
+
/// Returns true if `difficulty` has been explicitly set.
|
|
325
|
+
public var hasDifficulty: Bool {self._difficulty != nil}
|
|
326
|
+
/// Clears the value of `difficulty`. Subsequent reads from it will return its default value.
|
|
327
|
+
public mutating func clearDifficulty() {self._difficulty = nil}
|
|
328
|
+
|
|
329
|
+
public var route: Pulsefield_Protocol_V1_InferenceRoute = .unspecified
|
|
330
|
+
|
|
331
|
+
public var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
332
|
+
|
|
333
|
+
public init() {}
|
|
334
|
+
|
|
335
|
+
fileprivate var _audio: Pulsefield_Protocol_V1_AudioAssetRef? = nil
|
|
336
|
+
fileprivate var _difficulty: Double? = nil
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
/// Sent by a client once ambient sync has produced a reference clock lock.
|
|
340
|
+
public nonisolated struct Pulsefield_Protocol_V1_ReferenceTimeRequest: Sendable {
|
|
341
|
+
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
|
342
|
+
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
|
343
|
+
// methods supported on all messages.
|
|
344
|
+
|
|
345
|
+
/// Current playback/reference position in the selected audio, in milliseconds.
|
|
346
|
+
public var refTimeMs: UInt32 = 0
|
|
347
|
+
|
|
348
|
+
/// Client monotonic host-clock timestamp captured when ref_time_ms was sent.
|
|
349
|
+
public var localHostTimeSendMs: UInt64 = 0
|
|
350
|
+
|
|
351
|
+
/// Duration check in milliseconds. When present, it must match AudioRequest.
|
|
352
|
+
public var audioLengthMs: UInt32 {
|
|
353
|
+
get {_audioLengthMs ?? 0}
|
|
354
|
+
set {_audioLengthMs = newValue}
|
|
355
|
+
}
|
|
356
|
+
/// Returns true if `audioLengthMs` has been explicitly set.
|
|
357
|
+
public var hasAudioLengthMs: Bool {self._audioLengthMs != nil}
|
|
358
|
+
/// Clears the value of `audioLengthMs`. Subsequent reads from it will return its default value.
|
|
359
|
+
public mutating func clearAudioLengthMs() {self._audioLengthMs = nil}
|
|
360
|
+
|
|
361
|
+
public var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
362
|
+
|
|
363
|
+
public init() {}
|
|
364
|
+
|
|
365
|
+
fileprivate var _audioLengthMs: UInt32? = nil
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
/// Sent by a client to stop and reset an active endpoint session.
|
|
369
|
+
public nonisolated struct Pulsefield_Protocol_V1_StopSessionRequest: Sendable {
|
|
370
|
+
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
|
371
|
+
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
|
372
|
+
// methods supported on all messages.
|
|
373
|
+
|
|
374
|
+
/// Machine-readable stop reason such as "client_stop" or "peer_disconnect".
|
|
375
|
+
public var reason: String = String()
|
|
376
|
+
|
|
377
|
+
public var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
378
|
+
|
|
379
|
+
public init() {}
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
/// Machine-readable endpoint failure plus a human-readable message.
|
|
383
|
+
public nonisolated struct Pulsefield_Protocol_V1_ErrorEvent: Sendable {
|
|
384
|
+
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
|
385
|
+
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
|
386
|
+
// methods supported on all messages.
|
|
387
|
+
|
|
388
|
+
/// Stable string code retained for JSON compatibility with prototype clients.
|
|
389
|
+
public var code: String = String()
|
|
390
|
+
|
|
391
|
+
public var message: String = String()
|
|
392
|
+
|
|
393
|
+
/// Preferred typed error code for new protobuf consumers.
|
|
394
|
+
public var errorCode: Pulsefield_Protocol_V1_InferenceErrorCode = .unspecified
|
|
395
|
+
|
|
396
|
+
/// Endpoint phase that failed, such as "prepare_audio" or "stream".
|
|
397
|
+
public var phase: String = String()
|
|
398
|
+
|
|
399
|
+
/// Route active when the failure occurred, when known.
|
|
400
|
+
public var route: Pulsefield_Protocol_V1_InferenceRoute = .unspecified
|
|
401
|
+
|
|
402
|
+
/// Compatibility bucket used by the current JSON endpoint, such as "inference".
|
|
403
|
+
public var errorKind: String = String()
|
|
404
|
+
|
|
405
|
+
public var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
406
|
+
|
|
407
|
+
public init() {}
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
/// Endpoint lifecycle transition or current-status notification.
|
|
411
|
+
public nonisolated struct Pulsefield_Protocol_V1_StatusEvent: Sendable {
|
|
412
|
+
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
|
413
|
+
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
|
414
|
+
// methods supported on all messages.
|
|
415
|
+
|
|
416
|
+
/// Target status after this notification.
|
|
417
|
+
public var status: Pulsefield_Protocol_V1_EndpointStatus = .unspecified
|
|
418
|
+
|
|
419
|
+
public var message: String = String()
|
|
420
|
+
|
|
421
|
+
/// Reference-audio position associated with the status, when known.
|
|
422
|
+
public var refTimeMs: UInt32 {
|
|
423
|
+
get {_refTimeMs ?? 0}
|
|
424
|
+
set {_refTimeMs = newValue}
|
|
425
|
+
}
|
|
426
|
+
/// Returns true if `refTimeMs` has been explicitly set.
|
|
427
|
+
public var hasRefTimeMs: Bool {self._refTimeMs != nil}
|
|
428
|
+
/// Clears the value of `refTimeMs`. Subsequent reads from it will return its default value.
|
|
429
|
+
public mutating func clearRefTimeMs() {self._refTimeMs = nil}
|
|
430
|
+
|
|
431
|
+
/// Sender-local monotonic host-clock timestamp in milliseconds, when known.
|
|
432
|
+
public var senderMonotonicMs: UInt64 {
|
|
433
|
+
get {_senderMonotonicMs ?? 0}
|
|
434
|
+
set {_senderMonotonicMs = newValue}
|
|
435
|
+
}
|
|
436
|
+
/// Returns true if `senderMonotonicMs` has been explicitly set.
|
|
437
|
+
public var hasSenderMonotonicMs: Bool {self._senderMonotonicMs != nil}
|
|
438
|
+
/// Clears the value of `senderMonotonicMs`. Subsequent reads from it will return its default value.
|
|
439
|
+
public mutating func clearSenderMonotonicMs() {self._senderMonotonicMs = nil}
|
|
440
|
+
|
|
441
|
+
/// Previous status for transition logs.
|
|
442
|
+
public var fromStatus: Pulsefield_Protocol_V1_EndpointStatus = .unspecified
|
|
443
|
+
|
|
444
|
+
/// Machine-readable transition reason such as "audio_path" or "reference_time".
|
|
445
|
+
public var reason: String = String()
|
|
446
|
+
|
|
447
|
+
/// Selected audio duration associated with this transition, when known.
|
|
448
|
+
public var audioLengthMs: UInt32 {
|
|
449
|
+
get {_audioLengthMs ?? 0}
|
|
450
|
+
set {_audioLengthMs = newValue}
|
|
451
|
+
}
|
|
452
|
+
/// Returns true if `audioLengthMs` has been explicitly set.
|
|
453
|
+
public var hasAudioLengthMs: Bool {self._audioLengthMs != nil}
|
|
454
|
+
/// Clears the value of `audioLengthMs`. Subsequent reads from it will return its default value.
|
|
455
|
+
public mutating func clearAudioLengthMs() {self._audioLengthMs = nil}
|
|
456
|
+
|
|
457
|
+
/// Host-clock deadline for automatic cleanup after audio end, when scheduled.
|
|
458
|
+
public var resetSenderMonotonicMs: UInt64 {
|
|
459
|
+
get {_resetSenderMonotonicMs ?? 0}
|
|
460
|
+
set {_resetSenderMonotonicMs = newValue}
|
|
461
|
+
}
|
|
462
|
+
/// Returns true if `resetSenderMonotonicMs` has been explicitly set.
|
|
463
|
+
public var hasResetSenderMonotonicMs: Bool {self._resetSenderMonotonicMs != nil}
|
|
464
|
+
/// Clears the value of `resetSenderMonotonicMs`. Subsequent reads from it will return its default value.
|
|
465
|
+
public mutating func clearResetSenderMonotonicMs() {self._resetSenderMonotonicMs = nil}
|
|
466
|
+
|
|
467
|
+
/// Route active for this status transition, when relevant.
|
|
468
|
+
public var route: Pulsefield_Protocol_V1_InferenceRoute = .unspecified
|
|
469
|
+
|
|
470
|
+
/// User-facing difficulty associated with mapper preparation, when relevant.
|
|
471
|
+
public var difficulty: Double {
|
|
472
|
+
get {_difficulty ?? 0}
|
|
473
|
+
set {_difficulty = newValue}
|
|
474
|
+
}
|
|
475
|
+
/// Returns true if `difficulty` has been explicitly set.
|
|
476
|
+
public var hasDifficulty: Bool {self._difficulty != nil}
|
|
477
|
+
/// Clears the value of `difficulty`. Subsequent reads from it will return its default value.
|
|
478
|
+
public mutating func clearDifficulty() {self._difficulty = nil}
|
|
479
|
+
|
|
480
|
+
public var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
481
|
+
|
|
482
|
+
public init() {}
|
|
483
|
+
|
|
484
|
+
fileprivate var _refTimeMs: UInt32? = nil
|
|
485
|
+
fileprivate var _senderMonotonicMs: UInt64? = nil
|
|
486
|
+
fileprivate var _audioLengthMs: UInt32? = nil
|
|
487
|
+
fileprivate var _resetSenderMonotonicMs: UInt64? = nil
|
|
488
|
+
fileprivate var _difficulty: Double? = nil
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
/// Sent by the model service after all tokens through complete_through_ms were emitted.
|
|
492
|
+
public nonisolated struct Pulsefield_Protocol_V1_EndOfStreamEvent: Sendable {
|
|
493
|
+
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
|
494
|
+
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
|
495
|
+
// methods supported on all messages.
|
|
496
|
+
|
|
497
|
+
/// Selected audio duration in milliseconds.
|
|
498
|
+
public var audioLengthMs: UInt32 {
|
|
499
|
+
get {_audioLengthMs ?? 0}
|
|
500
|
+
set {_audioLengthMs = newValue}
|
|
501
|
+
}
|
|
502
|
+
/// Returns true if `audioLengthMs` has been explicitly set.
|
|
503
|
+
public var hasAudioLengthMs: Bool {self._audioLengthMs != nil}
|
|
504
|
+
/// Clears the value of `audioLengthMs`. Subsequent reads from it will return its default value.
|
|
505
|
+
public mutating func clearAudioLengthMs() {self._audioLengthMs = nil}
|
|
506
|
+
|
|
507
|
+
/// Reference-audio time through which the stream is complete.
|
|
508
|
+
public var completeThroughMs: UInt32 = 0
|
|
509
|
+
|
|
510
|
+
public var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
511
|
+
|
|
512
|
+
public init() {}
|
|
513
|
+
|
|
514
|
+
fileprivate var _audioLengthMs: UInt32? = nil
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
// MARK: - Code below here is support for the SwiftProtobuf runtime.
|
|
518
|
+
|
|
519
|
+
fileprivate nonisolated let _protobuf_package = "pulsefield.protocol.v1"
|
|
520
|
+
|
|
521
|
+
nonisolated extension Pulsefield_Protocol_V1_SyncSource: SwiftProtobuf._ProtoNameProviding {
|
|
522
|
+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0SYNC_SOURCE_UNSPECIFIED\0\u{1}SYNC_SOURCE_BACKGROUND\0\u{1}SYNC_SOURCE_SYSTEM_AUDIO\0")
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
nonisolated extension Pulsefield_Protocol_V1_InferenceRoute: SwiftProtobuf._ProtoNameProviding {
|
|
526
|
+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0INFERENCE_ROUTE_UNSPECIFIED\0\u{1}INFERENCE_ROUTE_MAPPER\0\u{1}INFERENCE_ROUTE_TIMING_MOCK\0")
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
nonisolated extension Pulsefield_Protocol_V1_EndpointStatus: SwiftProtobuf._ProtoNameProviding {
|
|
530
|
+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0ENDPOINT_STATUS_UNSPECIFIED\0\u{1}ENDPOINT_STATUS_READY\0\u{1}ENDPOINT_STATUS_AUDIO_PREPARING\0\u{1}ENDPOINT_STATUS_AUDIO_READY\0\u{1}ENDPOINT_STATUS_STREAMING\0\u{1}ENDPOINT_STATUS_STOPPED\0\u{1}ENDPOINT_STATUS_FAILED\0\u{1}ENDPOINT_STATUS_COLD\0\u{1}ENDPOINT_STATUS_NO_SESSION\0")
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
nonisolated extension Pulsefield_Protocol_V1_InferenceErrorCode: SwiftProtobuf._ProtoNameProviding {
|
|
534
|
+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0INFERENCE_ERROR_CODE_UNSPECIFIED\0\u{1}INFERENCE_ERROR_CODE_PROTOCOL_ERROR\0\u{1}INFERENCE_ERROR_CODE_INVALID_DEVICE\0\u{1}INFERENCE_ERROR_CODE_AUDIO_NOT_FOUND\0\u{1}INFERENCE_ERROR_CODE_INFERENCE_FAILED\0\u{1}INFERENCE_ERROR_CODE_SESSION_NOT_FOUND\0\u{1}INFERENCE_ERROR_CODE_SESSION_OWNERSHIP_CONFLICT\0\u{1}INFERENCE_ERROR_CODE_AUDIO_NOT_PREPARED\0\u{1}INFERENCE_ERROR_CODE_UNSUPPORTED_ROUTE\0")
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
nonisolated extension Pulsefield_Protocol_V1_ReadyRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
538
|
+
public static let protoMessageName: String = _protobuf_package + ".ReadyRequest"
|
|
539
|
+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap()
|
|
540
|
+
|
|
541
|
+
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
|
542
|
+
// Load everything into unknown fields
|
|
543
|
+
while try decoder.nextFieldNumber() != nil {}
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
547
|
+
try unknownFields.traverse(visitor: &visitor)
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
public static func ==(lhs: Pulsefield_Protocol_V1_ReadyRequest, rhs: Pulsefield_Protocol_V1_ReadyRequest) -> Bool {
|
|
551
|
+
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
552
|
+
return true
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
nonisolated extension Pulsefield_Protocol_V1_AudioAssetRef: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
557
|
+
public static let protoMessageName: String = _protobuf_package + ".AudioAssetRef"
|
|
558
|
+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}local_path\0\u{1}uri\0\u{3}asset_id\0\u{4}\u{7}audio_length_ms\0\u{3}sha256_hex\0")
|
|
559
|
+
|
|
560
|
+
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
|
561
|
+
while let fieldNumber = try decoder.nextFieldNumber() {
|
|
562
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
563
|
+
// allocates stack space for every case branch when no optimizations are
|
|
564
|
+
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
|
565
|
+
switch fieldNumber {
|
|
566
|
+
case 1: try {
|
|
567
|
+
var v: String?
|
|
568
|
+
try decoder.decodeSingularStringField(value: &v)
|
|
569
|
+
if let v = v {
|
|
570
|
+
if self.ref != nil {try decoder.handleConflictingOneOf()}
|
|
571
|
+
self.ref = .localPath(v)
|
|
572
|
+
}
|
|
573
|
+
}()
|
|
574
|
+
case 2: try {
|
|
575
|
+
var v: String?
|
|
576
|
+
try decoder.decodeSingularStringField(value: &v)
|
|
577
|
+
if let v = v {
|
|
578
|
+
if self.ref != nil {try decoder.handleConflictingOneOf()}
|
|
579
|
+
self.ref = .uri(v)
|
|
580
|
+
}
|
|
581
|
+
}()
|
|
582
|
+
case 3: try {
|
|
583
|
+
var v: String?
|
|
584
|
+
try decoder.decodeSingularStringField(value: &v)
|
|
585
|
+
if let v = v {
|
|
586
|
+
if self.ref != nil {try decoder.handleConflictingOneOf()}
|
|
587
|
+
self.ref = .assetID(v)
|
|
588
|
+
}
|
|
589
|
+
}()
|
|
590
|
+
case 10: try { try decoder.decodeSingularUInt32Field(value: &self._audioLengthMs) }()
|
|
591
|
+
case 11: try { try decoder.decodeSingularStringField(value: &self._sha256Hex) }()
|
|
592
|
+
default: break
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
598
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
599
|
+
// allocates stack space for every if/case branch local when no optimizations
|
|
600
|
+
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
|
|
601
|
+
// https://github.com/apple/swift-protobuf/issues/1182
|
|
602
|
+
switch self.ref {
|
|
603
|
+
case .localPath?: try {
|
|
604
|
+
guard case .localPath(let v)? = self.ref else { preconditionFailure() }
|
|
605
|
+
try visitor.visitSingularStringField(value: v, fieldNumber: 1)
|
|
606
|
+
}()
|
|
607
|
+
case .uri?: try {
|
|
608
|
+
guard case .uri(let v)? = self.ref else { preconditionFailure() }
|
|
609
|
+
try visitor.visitSingularStringField(value: v, fieldNumber: 2)
|
|
610
|
+
}()
|
|
611
|
+
case .assetID?: try {
|
|
612
|
+
guard case .assetID(let v)? = self.ref else { preconditionFailure() }
|
|
613
|
+
try visitor.visitSingularStringField(value: v, fieldNumber: 3)
|
|
614
|
+
}()
|
|
615
|
+
case nil: break
|
|
616
|
+
}
|
|
617
|
+
try { if let v = self._audioLengthMs {
|
|
618
|
+
try visitor.visitSingularUInt32Field(value: v, fieldNumber: 10)
|
|
619
|
+
} }()
|
|
620
|
+
try { if let v = self._sha256Hex {
|
|
621
|
+
try visitor.visitSingularStringField(value: v, fieldNumber: 11)
|
|
622
|
+
} }()
|
|
623
|
+
try unknownFields.traverse(visitor: &visitor)
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
public static func ==(lhs: Pulsefield_Protocol_V1_AudioAssetRef, rhs: Pulsefield_Protocol_V1_AudioAssetRef) -> Bool {
|
|
627
|
+
if lhs.ref != rhs.ref {return false}
|
|
628
|
+
if lhs._audioLengthMs != rhs._audioLengthMs {return false}
|
|
629
|
+
if lhs._sha256Hex != rhs._sha256Hex {return false}
|
|
630
|
+
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
631
|
+
return true
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
nonisolated extension Pulsefield_Protocol_V1_AudioRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
636
|
+
public static let protoMessageName: String = _protobuf_package + ".AudioRequest"
|
|
637
|
+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}audio\0\u{3}sync_source\0\u{1}difficulty\0\u{1}route\0")
|
|
638
|
+
|
|
639
|
+
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
|
640
|
+
while let fieldNumber = try decoder.nextFieldNumber() {
|
|
641
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
642
|
+
// allocates stack space for every case branch when no optimizations are
|
|
643
|
+
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
|
644
|
+
switch fieldNumber {
|
|
645
|
+
case 1: try { try decoder.decodeSingularMessageField(value: &self._audio) }()
|
|
646
|
+
case 2: try { try decoder.decodeSingularEnumField(value: &self.syncSource) }()
|
|
647
|
+
case 3: try { try decoder.decodeSingularDoubleField(value: &self._difficulty) }()
|
|
648
|
+
case 4: try { try decoder.decodeSingularEnumField(value: &self.route) }()
|
|
649
|
+
default: break
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
655
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
656
|
+
// allocates stack space for every if/case branch local when no optimizations
|
|
657
|
+
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
|
|
658
|
+
// https://github.com/apple/swift-protobuf/issues/1182
|
|
659
|
+
try { if let v = self._audio {
|
|
660
|
+
try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
|
|
661
|
+
} }()
|
|
662
|
+
if self.syncSource != .unspecified {
|
|
663
|
+
try visitor.visitSingularEnumField(value: self.syncSource, fieldNumber: 2)
|
|
664
|
+
}
|
|
665
|
+
try { if let v = self._difficulty {
|
|
666
|
+
try visitor.visitSingularDoubleField(value: v, fieldNumber: 3)
|
|
667
|
+
} }()
|
|
668
|
+
if self.route != .unspecified {
|
|
669
|
+
try visitor.visitSingularEnumField(value: self.route, fieldNumber: 4)
|
|
670
|
+
}
|
|
671
|
+
try unknownFields.traverse(visitor: &visitor)
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
public static func ==(lhs: Pulsefield_Protocol_V1_AudioRequest, rhs: Pulsefield_Protocol_V1_AudioRequest) -> Bool {
|
|
675
|
+
if lhs._audio != rhs._audio {return false}
|
|
676
|
+
if lhs.syncSource != rhs.syncSource {return false}
|
|
677
|
+
if lhs._difficulty != rhs._difficulty {return false}
|
|
678
|
+
if lhs.route != rhs.route {return false}
|
|
679
|
+
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
680
|
+
return true
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
nonisolated extension Pulsefield_Protocol_V1_ReferenceTimeRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
685
|
+
public static let protoMessageName: String = _protobuf_package + ".ReferenceTimeRequest"
|
|
686
|
+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}ref_time_ms\0\u{3}local_host_time_send_ms\0\u{3}audio_length_ms\0")
|
|
687
|
+
|
|
688
|
+
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
|
689
|
+
while let fieldNumber = try decoder.nextFieldNumber() {
|
|
690
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
691
|
+
// allocates stack space for every case branch when no optimizations are
|
|
692
|
+
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
|
693
|
+
switch fieldNumber {
|
|
694
|
+
case 1: try { try decoder.decodeSingularUInt32Field(value: &self.refTimeMs) }()
|
|
695
|
+
case 2: try { try decoder.decodeSingularUInt64Field(value: &self.localHostTimeSendMs) }()
|
|
696
|
+
case 3: try { try decoder.decodeSingularUInt32Field(value: &self._audioLengthMs) }()
|
|
697
|
+
default: break
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
703
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
704
|
+
// allocates stack space for every if/case branch local when no optimizations
|
|
705
|
+
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
|
|
706
|
+
// https://github.com/apple/swift-protobuf/issues/1182
|
|
707
|
+
if self.refTimeMs != 0 {
|
|
708
|
+
try visitor.visitSingularUInt32Field(value: self.refTimeMs, fieldNumber: 1)
|
|
709
|
+
}
|
|
710
|
+
if self.localHostTimeSendMs != 0 {
|
|
711
|
+
try visitor.visitSingularUInt64Field(value: self.localHostTimeSendMs, fieldNumber: 2)
|
|
712
|
+
}
|
|
713
|
+
try { if let v = self._audioLengthMs {
|
|
714
|
+
try visitor.visitSingularUInt32Field(value: v, fieldNumber: 3)
|
|
715
|
+
} }()
|
|
716
|
+
try unknownFields.traverse(visitor: &visitor)
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
public static func ==(lhs: Pulsefield_Protocol_V1_ReferenceTimeRequest, rhs: Pulsefield_Protocol_V1_ReferenceTimeRequest) -> Bool {
|
|
720
|
+
if lhs.refTimeMs != rhs.refTimeMs {return false}
|
|
721
|
+
if lhs.localHostTimeSendMs != rhs.localHostTimeSendMs {return false}
|
|
722
|
+
if lhs._audioLengthMs != rhs._audioLengthMs {return false}
|
|
723
|
+
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
724
|
+
return true
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
nonisolated extension Pulsefield_Protocol_V1_StopSessionRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
729
|
+
public static let protoMessageName: String = _protobuf_package + ".StopSessionRequest"
|
|
730
|
+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}reason\0")
|
|
731
|
+
|
|
732
|
+
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
|
733
|
+
while let fieldNumber = try decoder.nextFieldNumber() {
|
|
734
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
735
|
+
// allocates stack space for every case branch when no optimizations are
|
|
736
|
+
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
|
737
|
+
switch fieldNumber {
|
|
738
|
+
case 1: try { try decoder.decodeSingularStringField(value: &self.reason) }()
|
|
739
|
+
default: break
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
745
|
+
if !self.reason.isEmpty {
|
|
746
|
+
try visitor.visitSingularStringField(value: self.reason, fieldNumber: 1)
|
|
747
|
+
}
|
|
748
|
+
try unknownFields.traverse(visitor: &visitor)
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
public static func ==(lhs: Pulsefield_Protocol_V1_StopSessionRequest, rhs: Pulsefield_Protocol_V1_StopSessionRequest) -> Bool {
|
|
752
|
+
if lhs.reason != rhs.reason {return false}
|
|
753
|
+
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
754
|
+
return true
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
nonisolated extension Pulsefield_Protocol_V1_ErrorEvent: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
759
|
+
public static let protoMessageName: String = _protobuf_package + ".ErrorEvent"
|
|
760
|
+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}code\0\u{1}message\0\u{3}error_code\0\u{1}phase\0\u{1}route\0\u{3}error_kind\0")
|
|
761
|
+
|
|
762
|
+
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
|
763
|
+
while let fieldNumber = try decoder.nextFieldNumber() {
|
|
764
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
765
|
+
// allocates stack space for every case branch when no optimizations are
|
|
766
|
+
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
|
767
|
+
switch fieldNumber {
|
|
768
|
+
case 1: try { try decoder.decodeSingularStringField(value: &self.code) }()
|
|
769
|
+
case 2: try { try decoder.decodeSingularStringField(value: &self.message) }()
|
|
770
|
+
case 3: try { try decoder.decodeSingularEnumField(value: &self.errorCode) }()
|
|
771
|
+
case 4: try { try decoder.decodeSingularStringField(value: &self.phase) }()
|
|
772
|
+
case 5: try { try decoder.decodeSingularEnumField(value: &self.route) }()
|
|
773
|
+
case 6: try { try decoder.decodeSingularStringField(value: &self.errorKind) }()
|
|
774
|
+
default: break
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
780
|
+
if !self.code.isEmpty {
|
|
781
|
+
try visitor.visitSingularStringField(value: self.code, fieldNumber: 1)
|
|
782
|
+
}
|
|
783
|
+
if !self.message.isEmpty {
|
|
784
|
+
try visitor.visitSingularStringField(value: self.message, fieldNumber: 2)
|
|
785
|
+
}
|
|
786
|
+
if self.errorCode != .unspecified {
|
|
787
|
+
try visitor.visitSingularEnumField(value: self.errorCode, fieldNumber: 3)
|
|
788
|
+
}
|
|
789
|
+
if !self.phase.isEmpty {
|
|
790
|
+
try visitor.visitSingularStringField(value: self.phase, fieldNumber: 4)
|
|
791
|
+
}
|
|
792
|
+
if self.route != .unspecified {
|
|
793
|
+
try visitor.visitSingularEnumField(value: self.route, fieldNumber: 5)
|
|
794
|
+
}
|
|
795
|
+
if !self.errorKind.isEmpty {
|
|
796
|
+
try visitor.visitSingularStringField(value: self.errorKind, fieldNumber: 6)
|
|
797
|
+
}
|
|
798
|
+
try unknownFields.traverse(visitor: &visitor)
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
public static func ==(lhs: Pulsefield_Protocol_V1_ErrorEvent, rhs: Pulsefield_Protocol_V1_ErrorEvent) -> Bool {
|
|
802
|
+
if lhs.code != rhs.code {return false}
|
|
803
|
+
if lhs.message != rhs.message {return false}
|
|
804
|
+
if lhs.errorCode != rhs.errorCode {return false}
|
|
805
|
+
if lhs.phase != rhs.phase {return false}
|
|
806
|
+
if lhs.route != rhs.route {return false}
|
|
807
|
+
if lhs.errorKind != rhs.errorKind {return false}
|
|
808
|
+
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
809
|
+
return true
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
nonisolated extension Pulsefield_Protocol_V1_StatusEvent: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
814
|
+
public static let protoMessageName: String = _protobuf_package + ".StatusEvent"
|
|
815
|
+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}status\0\u{1}message\0\u{3}ref_time_ms\0\u{3}sender_monotonic_ms\0\u{3}from_status\0\u{1}reason\0\u{3}audio_length_ms\0\u{3}reset_sender_monotonic_ms\0\u{1}route\0\u{1}difficulty\0")
|
|
816
|
+
|
|
817
|
+
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
|
818
|
+
while let fieldNumber = try decoder.nextFieldNumber() {
|
|
819
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
820
|
+
// allocates stack space for every case branch when no optimizations are
|
|
821
|
+
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
|
822
|
+
switch fieldNumber {
|
|
823
|
+
case 1: try { try decoder.decodeSingularEnumField(value: &self.status) }()
|
|
824
|
+
case 2: try { try decoder.decodeSingularStringField(value: &self.message) }()
|
|
825
|
+
case 3: try { try decoder.decodeSingularUInt32Field(value: &self._refTimeMs) }()
|
|
826
|
+
case 4: try { try decoder.decodeSingularUInt64Field(value: &self._senderMonotonicMs) }()
|
|
827
|
+
case 5: try { try decoder.decodeSingularEnumField(value: &self.fromStatus) }()
|
|
828
|
+
case 6: try { try decoder.decodeSingularStringField(value: &self.reason) }()
|
|
829
|
+
case 7: try { try decoder.decodeSingularUInt32Field(value: &self._audioLengthMs) }()
|
|
830
|
+
case 8: try { try decoder.decodeSingularUInt64Field(value: &self._resetSenderMonotonicMs) }()
|
|
831
|
+
case 9: try { try decoder.decodeSingularEnumField(value: &self.route) }()
|
|
832
|
+
case 10: try { try decoder.decodeSingularDoubleField(value: &self._difficulty) }()
|
|
833
|
+
default: break
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
839
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
840
|
+
// allocates stack space for every if/case branch local when no optimizations
|
|
841
|
+
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
|
|
842
|
+
// https://github.com/apple/swift-protobuf/issues/1182
|
|
843
|
+
if self.status != .unspecified {
|
|
844
|
+
try visitor.visitSingularEnumField(value: self.status, fieldNumber: 1)
|
|
845
|
+
}
|
|
846
|
+
if !self.message.isEmpty {
|
|
847
|
+
try visitor.visitSingularStringField(value: self.message, fieldNumber: 2)
|
|
848
|
+
}
|
|
849
|
+
try { if let v = self._refTimeMs {
|
|
850
|
+
try visitor.visitSingularUInt32Field(value: v, fieldNumber: 3)
|
|
851
|
+
} }()
|
|
852
|
+
try { if let v = self._senderMonotonicMs {
|
|
853
|
+
try visitor.visitSingularUInt64Field(value: v, fieldNumber: 4)
|
|
854
|
+
} }()
|
|
855
|
+
if self.fromStatus != .unspecified {
|
|
856
|
+
try visitor.visitSingularEnumField(value: self.fromStatus, fieldNumber: 5)
|
|
857
|
+
}
|
|
858
|
+
if !self.reason.isEmpty {
|
|
859
|
+
try visitor.visitSingularStringField(value: self.reason, fieldNumber: 6)
|
|
860
|
+
}
|
|
861
|
+
try { if let v = self._audioLengthMs {
|
|
862
|
+
try visitor.visitSingularUInt32Field(value: v, fieldNumber: 7)
|
|
863
|
+
} }()
|
|
864
|
+
try { if let v = self._resetSenderMonotonicMs {
|
|
865
|
+
try visitor.visitSingularUInt64Field(value: v, fieldNumber: 8)
|
|
866
|
+
} }()
|
|
867
|
+
if self.route != .unspecified {
|
|
868
|
+
try visitor.visitSingularEnumField(value: self.route, fieldNumber: 9)
|
|
869
|
+
}
|
|
870
|
+
try { if let v = self._difficulty {
|
|
871
|
+
try visitor.visitSingularDoubleField(value: v, fieldNumber: 10)
|
|
872
|
+
} }()
|
|
873
|
+
try unknownFields.traverse(visitor: &visitor)
|
|
874
|
+
}
|
|
875
|
+
|
|
876
|
+
public static func ==(lhs: Pulsefield_Protocol_V1_StatusEvent, rhs: Pulsefield_Protocol_V1_StatusEvent) -> Bool {
|
|
877
|
+
if lhs.status != rhs.status {return false}
|
|
878
|
+
if lhs.message != rhs.message {return false}
|
|
879
|
+
if lhs._refTimeMs != rhs._refTimeMs {return false}
|
|
880
|
+
if lhs._senderMonotonicMs != rhs._senderMonotonicMs {return false}
|
|
881
|
+
if lhs.fromStatus != rhs.fromStatus {return false}
|
|
882
|
+
if lhs.reason != rhs.reason {return false}
|
|
883
|
+
if lhs._audioLengthMs != rhs._audioLengthMs {return false}
|
|
884
|
+
if lhs._resetSenderMonotonicMs != rhs._resetSenderMonotonicMs {return false}
|
|
885
|
+
if lhs.route != rhs.route {return false}
|
|
886
|
+
if lhs._difficulty != rhs._difficulty {return false}
|
|
887
|
+
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
888
|
+
return true
|
|
889
|
+
}
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
nonisolated extension Pulsefield_Protocol_V1_EndOfStreamEvent: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
893
|
+
public static let protoMessageName: String = _protobuf_package + ".EndOfStreamEvent"
|
|
894
|
+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}audio_length_ms\0\u{3}complete_through_ms\0")
|
|
895
|
+
|
|
896
|
+
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
|
897
|
+
while let fieldNumber = try decoder.nextFieldNumber() {
|
|
898
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
899
|
+
// allocates stack space for every case branch when no optimizations are
|
|
900
|
+
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
|
901
|
+
switch fieldNumber {
|
|
902
|
+
case 1: try { try decoder.decodeSingularUInt32Field(value: &self._audioLengthMs) }()
|
|
903
|
+
case 2: try { try decoder.decodeSingularUInt32Field(value: &self.completeThroughMs) }()
|
|
904
|
+
default: break
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
910
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
911
|
+
// allocates stack space for every if/case branch local when no optimizations
|
|
912
|
+
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
|
|
913
|
+
// https://github.com/apple/swift-protobuf/issues/1182
|
|
914
|
+
try { if let v = self._audioLengthMs {
|
|
915
|
+
try visitor.visitSingularUInt32Field(value: v, fieldNumber: 1)
|
|
916
|
+
} }()
|
|
917
|
+
if self.completeThroughMs != 0 {
|
|
918
|
+
try visitor.visitSingularUInt32Field(value: self.completeThroughMs, fieldNumber: 2)
|
|
919
|
+
}
|
|
920
|
+
try unknownFields.traverse(visitor: &visitor)
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
public static func ==(lhs: Pulsefield_Protocol_V1_EndOfStreamEvent, rhs: Pulsefield_Protocol_V1_EndOfStreamEvent) -> Bool {
|
|
924
|
+
if lhs._audioLengthMs != rhs._audioLengthMs {return false}
|
|
925
|
+
if lhs.completeThroughMs != rhs.completeThroughMs {return false}
|
|
926
|
+
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
927
|
+
return true
|
|
928
|
+
}
|
|
929
|
+
}
|