d2m.pb.swift 38 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103
  1. // _____ _
  2. // |_ _| |_ _ _ ___ ___ _ __ __ _
  3. // | | | ' \| '_/ -_) -_) ' \/ _` |_
  4. // |_| |_||_|_| \___\___|_|_|_\__,_(_)
  5. //
  6. // Threema iOS Client
  7. // Copyright (c) 2020 Threema GmbH
  8. //
  9. // This program is free software: you can redistribute it and/or modify
  10. // it under the terms of the GNU Affero General Public License, version 3,
  11. // as published by the Free Software Foundation.
  12. //
  13. // This program is distributed in the hope that it will be useful,
  14. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. // GNU Affero General Public License for more details.
  17. //
  18. // You should have received a copy of the GNU Affero General Public License
  19. // along with this program. If not, see <https://www.gnu.org/licenses/>.
  20. import Foundation
  21. import SwiftProtobuf
  22. // If the compiler emits an error on this type, it is because this file
  23. // was generated by a version of the `protoc` Swift plug-in that is
  24. // incompatible with the version of SwiftProtobuf to which you are linking.
  25. // Please ensure that you are building against the same version of the API
  26. // that was used to generate this file.
  27. fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
  28. struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
  29. typealias Version = _2
  30. }
  31. /// Policy determining the device slot's lifetime.
  32. enum D2m_DeviceSlotExpirationPolicy: SwiftProtobuf.Enum {
  33. typealias RawValue = Int
  34. /// The device slot should be removed shortly after the device
  35. /// disconnected. However, there should be a delay of several minutes to
  36. /// ensure that the device can reconnect if it disconnected unintentionally.
  37. case volatile // = 0
  38. /// The device slot should be kept as long as possible
  39. case persistent // = 1
  40. case UNRECOGNIZED(Int)
  41. init() {
  42. self = .volatile
  43. }
  44. init?(rawValue: Int) {
  45. switch rawValue {
  46. case 0: self = .volatile
  47. case 1: self = .persistent
  48. default: self = .UNRECOGNIZED(rawValue)
  49. }
  50. }
  51. var rawValue: Int {
  52. switch self {
  53. case .volatile: return 0
  54. case .persistent: return 1
  55. case .UNRECOGNIZED(let i): return i
  56. }
  57. }
  58. }
  59. #if swift(>=4.2)
  60. extension D2m_DeviceSlotExpirationPolicy: CaseIterable {
  61. // The compiler won't synthesize support with the UNRECOGNIZED case.
  62. static var allCases: [D2m_DeviceSlotExpirationPolicy] = [
  63. .volatile,
  64. .persistent,
  65. ]
  66. }
  67. #endif // swift(>=4.2)
  68. /// Send along client information when connecting to the mediator server.
  69. ///
  70. /// This message is serialized, hex-encoded (lowercase) and then used as the
  71. /// WebSocket path.
  72. ///
  73. /// Type: n/a
  74. /// Direction: Client -> Server
  75. struct D2m_ClientUrlInfo {
  76. // SwiftProtobuf.Message conformance is added in an extension below. See the
  77. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  78. // methods supported on all messages.
  79. /// 32 byte mediator path public key
  80. var mpk: Data = SwiftProtobuf.Internal.emptyData
  81. /// Server group, as assigned by the server when the Threema identity has
  82. /// been created.
  83. var serverGroup: UInt32 = 0
  84. var unknownFields = SwiftProtobuf.UnknownStorage()
  85. init() {}
  86. }
  87. /// Initial message from the server, containing an authentication challenge.
  88. ///
  89. /// Type: 0x10
  90. /// Direction: Client <-- Server
  91. struct D2m_ServerHello {
  92. // SwiftProtobuf.Message conformance is added in an extension below. See the
  93. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  94. // methods supported on all messages.
  95. /// Highest protocol version the server supports
  96. var version: UInt32 = 0
  97. /// 32 byte temporary public key
  98. var tpk: Data = SwiftProtobuf.Internal.emptyData
  99. /// 32 byte random challenge
  100. var challenge: Data = SwiftProtobuf.Internal.emptyData
  101. var unknownFields = SwiftProtobuf.UnknownStorage()
  102. init() {}
  103. }
  104. /// Initial message from the client, containing the authentication challenge
  105. /// response and additional login information.
  106. ///
  107. /// Type: 0x11
  108. /// Direction: Client --> Server
  109. struct D2m_ClientHello {
  110. // SwiftProtobuf.Message conformance is added in an extension below. See the
  111. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  112. // methods supported on all messages.
  113. /// Protocol version which the client has selected
  114. var version: UInt32 = 0
  115. /// Challenge response (72 bytes) for authentication.
  116. ///
  117. /// The response is created using NaCl box encryption:
  118. ///
  119. /// Box(MPK.secret, TPK.public)
  120. /// .encrypt(data=<challenge>, nonce=<random>)
  121. ///
  122. /// The nonce is then prepended to the encrypted challenge.
  123. ///
  124. /// nonce (24 bytes) || encrypted-box (16 + 32 bytes)
  125. var response: Data = SwiftProtobuf.Internal.emptyData
  126. /// Unique device id
  127. var deviceID: UInt64 = 0
  128. var deviceSlotsExhaustedPolicy: D2m_ClientHello.DeviceSlotsExhaustedPolicy = .reject
  129. /// Policy determining the device slot's lifetime
  130. var deviceSlotExpirationPolicy: D2m_DeviceSlotExpirationPolicy = .volatile
  131. /// Device info (`d2d.DeviceInfo`), encrypted by `MK.secret`
  132. var encryptedDeviceInfo: Data = SwiftProtobuf.Internal.emptyData
  133. var unknownFields = SwiftProtobuf.UnknownStorage()
  134. /// Policy to be applied in case the device id is not registered on the server
  135. /// and all device slots have been exhausted.
  136. enum DeviceSlotsExhaustedPolicy: SwiftProtobuf.Enum {
  137. typealias RawValue = Int
  138. /// Terminate the connection
  139. case reject // = 0
  140. /// Drop the least recently used device
  141. case dropLeastRecent // = 1
  142. case UNRECOGNIZED(Int)
  143. init() {
  144. self = .reject
  145. }
  146. init?(rawValue: Int) {
  147. switch rawValue {
  148. case 0: self = .reject
  149. case 1: self = .dropLeastRecent
  150. default: self = .UNRECOGNIZED(rawValue)
  151. }
  152. }
  153. var rawValue: Int {
  154. switch self {
  155. case .reject: return 0
  156. case .dropLeastRecent: return 1
  157. case .UNRECOGNIZED(let i): return i
  158. }
  159. }
  160. }
  161. init() {}
  162. }
  163. #if swift(>=4.2)
  164. extension D2m_ClientHello.DeviceSlotsExhaustedPolicy: CaseIterable {
  165. // The compiler won't synthesize support with the UNRECOGNIZED case.
  166. static var allCases: [D2m_ClientHello.DeviceSlotsExhaustedPolicy] = [
  167. .reject,
  168. .dropLeastRecent,
  169. ]
  170. }
  171. #endif // swift(>=4.2)
  172. /// Parts of the server's configuration and the device slot state.
  173. ///
  174. /// Type: 0x12
  175. /// Direction: Client <-- Server
  176. struct D2m_ServerInfo {
  177. // SwiftProtobuf.Message conformance is added in an extension below. See the
  178. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  179. // methods supported on all messages.
  180. /// Maximum number of device slots
  181. var maxDeviceSlots: UInt32 = 0
  182. var deviceSlotState: D2m_ServerInfo.DeviceSlotState = .new
  183. /// Device data shared among devices (`SharedDeviceData`), encrypted by
  184. /// `MK.secret`.
  185. var encryptedSharedDeviceData: Data = SwiftProtobuf.Internal.emptyData
  186. var unknownFields = SwiftProtobuf.UnknownStorage()
  187. /// Informs the device about its device slot state on the server
  188. enum DeviceSlotState: SwiftProtobuf.Enum {
  189. typealias RawValue = Int
  190. /// A new device slot has been allocated for the device (i.e. the device's
  191. /// id was not registered on the server).
  192. case new // = 0
  193. /// An existing device slot has been reused for the device (i.e. the
  194. /// device's id is already registered on the server).
  195. case existing // = 1
  196. case UNRECOGNIZED(Int)
  197. init() {
  198. self = .new
  199. }
  200. init?(rawValue: Int) {
  201. switch rawValue {
  202. case 0: self = .new
  203. case 1: self = .existing
  204. default: self = .UNRECOGNIZED(rawValue)
  205. }
  206. }
  207. var rawValue: Int {
  208. switch self {
  209. case .new: return 0
  210. case .existing: return 1
  211. case .UNRECOGNIZED(let i): return i
  212. }
  213. }
  214. }
  215. init() {}
  216. }
  217. #if swift(>=4.2)
  218. extension D2m_ServerInfo.DeviceSlotState: CaseIterable {
  219. // The compiler won't synthesize support with the UNRECOGNIZED case.
  220. static var allCases: [D2m_ServerInfo.DeviceSlotState] = [
  221. .new,
  222. .existing,
  223. ]
  224. }
  225. #endif // swift(>=4.2)
  226. /// The device's reflection queue on the server has been fully transmitted to
  227. /// the device.
  228. ///
  229. /// Note: This does not mean that reflected messages have already been
  230. /// acknowledged by the device!
  231. ///
  232. /// Type: 0x20
  233. /// Direction: Client <-- Server
  234. struct D2m_ReflectionQueueDry {
  235. // SwiftProtobuf.Message conformance is added in an extension below. See the
  236. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  237. // methods supported on all messages.
  238. var unknownFields = SwiftProtobuf.UnknownStorage()
  239. init() {}
  240. }
  241. /// The device's role has been promoted to leader, indicating that the device
  242. /// should now request to receive and reflect messages from the chat server.
  243. ///
  244. /// Type: 0x21
  245. /// Direction: Client <-- Server
  246. struct D2m_RolePromotedToLeader {
  247. // SwiftProtobuf.Message conformance is added in an extension below. See the
  248. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  249. // methods supported on all messages.
  250. var unknownFields = SwiftProtobuf.UnknownStorage()
  251. init() {}
  252. }
  253. /// Request device information of all devices.
  254. ///
  255. /// Type: 0x30
  256. /// Direction: Client --> Server
  257. struct D2m_GetDevicesInfo {
  258. // SwiftProtobuf.Message conformance is added in an extension below. See the
  259. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  260. // methods supported on all messages.
  261. var unknownFields = SwiftProtobuf.UnknownStorage()
  262. init() {}
  263. }
  264. /// Device information of all devices.
  265. ///
  266. /// Type: 0x31
  267. /// Direction: Client <-- Server
  268. struct D2m_DevicesInfo {
  269. // SwiftProtobuf.Message conformance is added in an extension below. See the
  270. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  271. // methods supported on all messages.
  272. var augmentedDeviceInfo: Dictionary<UInt64,D2m_DevicesInfo.AugmentedDeviceInfo> = [:]
  273. var unknownFields = SwiftProtobuf.UnknownStorage()
  274. /// Device id to (augmented) device info map of all devices.
  275. struct AugmentedDeviceInfo {
  276. // SwiftProtobuf.Message conformance is added in an extension below. See the
  277. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  278. // methods supported on all messages.
  279. /// Device info (`d2d.DeviceInfo`), encrypted by `MK.secret`.
  280. var encryptedDeviceInfo: Data = SwiftProtobuf.Internal.emptyData
  281. /// Unix-ish timestamp in milliseconds containing the most recent login
  282. /// time of the device.
  283. var lastLoginAt: UInt64 = 0
  284. /// Expiration policy of the device.
  285. var deviceSlotExpirationPolicy: D2m_DeviceSlotExpirationPolicy = .volatile
  286. var unknownFields = SwiftProtobuf.UnknownStorage()
  287. init() {}
  288. }
  289. init() {}
  290. }
  291. /// Request to drop a device and free its device slot.
  292. ///
  293. /// Type: 0x32
  294. /// Direction: Client --> Server
  295. struct D2m_DropDevice {
  296. // SwiftProtobuf.Message conformance is added in an extension below. See the
  297. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  298. // methods supported on all messages.
  299. /// Unique device id
  300. var deviceID: UInt64 = 0
  301. var unknownFields = SwiftProtobuf.UnknownStorage()
  302. init() {}
  303. }
  304. /// Acknowledges that a device has been dropped and the device slot has been
  305. /// free'd.
  306. ///
  307. /// Type: 0x33
  308. /// Direction: Client <-- Server
  309. struct D2m_DropDeviceAck {
  310. // SwiftProtobuf.Message conformance is added in an extension below. See the
  311. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  312. // methods supported on all messages.
  313. /// Unique device id
  314. var deviceID: UInt64 = 0
  315. var unknownFields = SwiftProtobuf.UnknownStorage()
  316. init() {}
  317. }
  318. /// Set the shared device data which is being sent to each device during login.
  319. ///
  320. /// Type: 0x34
  321. /// Direction: Client --> Server
  322. struct D2m_SetSharedDeviceData {
  323. // SwiftProtobuf.Message conformance is added in an extension below. See the
  324. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  325. // methods supported on all messages.
  326. /// Device data shared among devices (`SharedDeviceData`), encrypted by
  327. /// `MK.secret`.
  328. var encryptedSharedDeviceData: Data = SwiftProtobuf.Internal.emptyData
  329. var unknownFields = SwiftProtobuf.UnknownStorage()
  330. init() {}
  331. }
  332. /// Acquires a device group lock for an atomic operation shared across the
  333. /// device group.
  334. ///
  335. /// Reflection messages from the device to the mediator server will only be
  336. /// reflected once the transaction is committed.
  337. ///
  338. /// Type: 0x40
  339. /// Direction: Client --> Server
  340. struct D2m_BeginTransaction {
  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. /// The transaction scope (`TransactionScope` in D2D), encrypted by
  345. /// `MK.secret`
  346. var encryptedScope: Data = SwiftProtobuf.Internal.emptyData
  347. var unknownFields = SwiftProtobuf.UnknownStorage()
  348. init() {}
  349. }
  350. /// Acknowledges that the device group lock has been acquired and that the
  351. /// transaction has been started.
  352. ///
  353. /// Type: 0x41
  354. /// Direction: Client <-- Server
  355. struct D2m_BeginTransactionAck {
  356. // SwiftProtobuf.Message conformance is added in an extension below. See the
  357. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  358. // methods supported on all messages.
  359. var unknownFields = SwiftProtobuf.UnknownStorage()
  360. init() {}
  361. }
  362. /// Commits a transaction, releases a device group lock.
  363. ///
  364. /// Type: 0x42
  365. /// Direction: Client --> Server
  366. struct D2m_CommitTransaction {
  367. // SwiftProtobuf.Message conformance is added in an extension below. See the
  368. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  369. // methods supported on all messages.
  370. var unknownFields = SwiftProtobuf.UnknownStorage()
  371. init() {}
  372. }
  373. /// Acknowledges that the transaction has been committed and that the device
  374. /// group lock has been released.
  375. ///
  376. /// Type: 0x43
  377. /// Direction: Client <-- Server
  378. struct D2m_CommitTransactionAck {
  379. // SwiftProtobuf.Message conformance is added in an extension below. See the
  380. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  381. // methods supported on all messages.
  382. var unknownFields = SwiftProtobuf.UnknownStorage()
  383. init() {}
  384. }
  385. /// A `BeginTransaction` request is rejected because another transaction is
  386. /// already in process.
  387. ///
  388. /// Type: 0x44
  389. /// Direction: Client <-- Server
  390. struct D2m_TransactionRejected {
  391. // SwiftProtobuf.Message conformance is added in an extension below. See the
  392. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  393. // methods supported on all messages.
  394. /// The device that currently holds the lock
  395. var deviceID: UInt64 = 0
  396. /// The encrypted transaction scope associated with the currently locked transaction
  397. var encryptedScope: Data = SwiftProtobuf.Internal.emptyData
  398. var unknownFields = SwiftProtobuf.UnknownStorage()
  399. init() {}
  400. }
  401. /// When a transaction ends (either because it was committed or because the
  402. /// device disconnected), this message is sent to all connected devices except
  403. /// for the device that committed the transaction.
  404. ///
  405. /// This can be used by the other devices as a "retry signal" if a previous
  406. /// "BeginTransaction" attempt was unsuccessful.
  407. ///
  408. /// Type: 0x45
  409. /// Direction: Client <-- Server
  410. struct D2m_TransactionEnded {
  411. // SwiftProtobuf.Message conformance is added in an extension below. See the
  412. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  413. // methods supported on all messages.
  414. /// The device that held the lock up until now
  415. var deviceID: UInt64 = 0
  416. /// The encrypted transaction scope associated with the transaction that just ended
  417. var encryptedScope: Data = SwiftProtobuf.Internal.emptyData
  418. var unknownFields = SwiftProtobuf.UnknownStorage()
  419. init() {}
  420. }
  421. // MARK: - Code below here is support for the SwiftProtobuf runtime.
  422. fileprivate let _protobuf_package = "d2m"
  423. extension D2m_DeviceSlotExpirationPolicy: SwiftProtobuf._ProtoNameProviding {
  424. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  425. 0: .same(proto: "VOLATILE"),
  426. 1: .same(proto: "PERSISTENT"),
  427. ]
  428. }
  429. extension D2m_ClientUrlInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  430. static let protoMessageName: String = _protobuf_package + ".ClientUrlInfo"
  431. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  432. 1: .same(proto: "mpk"),
  433. 2: .standard(proto: "server_group"),
  434. ]
  435. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  436. while let fieldNumber = try decoder.nextFieldNumber() {
  437. switch fieldNumber {
  438. case 1: try decoder.decodeSingularBytesField(value: &self.mpk)
  439. case 2: try decoder.decodeSingularUInt32Field(value: &self.serverGroup)
  440. default: break
  441. }
  442. }
  443. }
  444. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  445. if !self.mpk.isEmpty {
  446. try visitor.visitSingularBytesField(value: self.mpk, fieldNumber: 1)
  447. }
  448. if self.serverGroup != 0 {
  449. try visitor.visitSingularUInt32Field(value: self.serverGroup, fieldNumber: 2)
  450. }
  451. try unknownFields.traverse(visitor: &visitor)
  452. }
  453. static func ==(lhs: D2m_ClientUrlInfo, rhs: D2m_ClientUrlInfo) -> Bool {
  454. if lhs.mpk != rhs.mpk {return false}
  455. if lhs.serverGroup != rhs.serverGroup {return false}
  456. if lhs.unknownFields != rhs.unknownFields {return false}
  457. return true
  458. }
  459. }
  460. extension D2m_ServerHello: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  461. static let protoMessageName: String = _protobuf_package + ".ServerHello"
  462. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  463. 1: .same(proto: "version"),
  464. 2: .same(proto: "tpk"),
  465. 3: .same(proto: "challenge"),
  466. ]
  467. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  468. while let fieldNumber = try decoder.nextFieldNumber() {
  469. switch fieldNumber {
  470. case 1: try decoder.decodeSingularUInt32Field(value: &self.version)
  471. case 2: try decoder.decodeSingularBytesField(value: &self.tpk)
  472. case 3: try decoder.decodeSingularBytesField(value: &self.challenge)
  473. default: break
  474. }
  475. }
  476. }
  477. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  478. if self.version != 0 {
  479. try visitor.visitSingularUInt32Field(value: self.version, fieldNumber: 1)
  480. }
  481. if !self.tpk.isEmpty {
  482. try visitor.visitSingularBytesField(value: self.tpk, fieldNumber: 2)
  483. }
  484. if !self.challenge.isEmpty {
  485. try visitor.visitSingularBytesField(value: self.challenge, fieldNumber: 3)
  486. }
  487. try unknownFields.traverse(visitor: &visitor)
  488. }
  489. static func ==(lhs: D2m_ServerHello, rhs: D2m_ServerHello) -> Bool {
  490. if lhs.version != rhs.version {return false}
  491. if lhs.tpk != rhs.tpk {return false}
  492. if lhs.challenge != rhs.challenge {return false}
  493. if lhs.unknownFields != rhs.unknownFields {return false}
  494. return true
  495. }
  496. }
  497. extension D2m_ClientHello: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  498. static let protoMessageName: String = _protobuf_package + ".ClientHello"
  499. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  500. 1: .same(proto: "version"),
  501. 2: .same(proto: "response"),
  502. 3: .standard(proto: "device_id"),
  503. 4: .standard(proto: "device_slots_exhausted_policy"),
  504. 5: .standard(proto: "device_slot_expiration_policy"),
  505. 6: .standard(proto: "encrypted_device_info"),
  506. ]
  507. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  508. while let fieldNumber = try decoder.nextFieldNumber() {
  509. switch fieldNumber {
  510. case 1: try decoder.decodeSingularUInt32Field(value: &self.version)
  511. case 2: try decoder.decodeSingularBytesField(value: &self.response)
  512. case 3: try decoder.decodeSingularFixed64Field(value: &self.deviceID)
  513. case 4: try decoder.decodeSingularEnumField(value: &self.deviceSlotsExhaustedPolicy)
  514. case 5: try decoder.decodeSingularEnumField(value: &self.deviceSlotExpirationPolicy)
  515. case 6: try decoder.decodeSingularBytesField(value: &self.encryptedDeviceInfo)
  516. default: break
  517. }
  518. }
  519. }
  520. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  521. if self.version != 0 {
  522. try visitor.visitSingularUInt32Field(value: self.version, fieldNumber: 1)
  523. }
  524. if !self.response.isEmpty {
  525. try visitor.visitSingularBytesField(value: self.response, fieldNumber: 2)
  526. }
  527. if self.deviceID != 0 {
  528. try visitor.visitSingularFixed64Field(value: self.deviceID, fieldNumber: 3)
  529. }
  530. if self.deviceSlotsExhaustedPolicy != .reject {
  531. try visitor.visitSingularEnumField(value: self.deviceSlotsExhaustedPolicy, fieldNumber: 4)
  532. }
  533. if self.deviceSlotExpirationPolicy != .volatile {
  534. try visitor.visitSingularEnumField(value: self.deviceSlotExpirationPolicy, fieldNumber: 5)
  535. }
  536. if !self.encryptedDeviceInfo.isEmpty {
  537. try visitor.visitSingularBytesField(value: self.encryptedDeviceInfo, fieldNumber: 6)
  538. }
  539. try unknownFields.traverse(visitor: &visitor)
  540. }
  541. static func ==(lhs: D2m_ClientHello, rhs: D2m_ClientHello) -> Bool {
  542. if lhs.version != rhs.version {return false}
  543. if lhs.response != rhs.response {return false}
  544. if lhs.deviceID != rhs.deviceID {return false}
  545. if lhs.deviceSlotsExhaustedPolicy != rhs.deviceSlotsExhaustedPolicy {return false}
  546. if lhs.deviceSlotExpirationPolicy != rhs.deviceSlotExpirationPolicy {return false}
  547. if lhs.encryptedDeviceInfo != rhs.encryptedDeviceInfo {return false}
  548. if lhs.unknownFields != rhs.unknownFields {return false}
  549. return true
  550. }
  551. }
  552. extension D2m_ClientHello.DeviceSlotsExhaustedPolicy: SwiftProtobuf._ProtoNameProviding {
  553. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  554. 0: .same(proto: "REJECT"),
  555. 1: .same(proto: "DROP_LEAST_RECENT"),
  556. ]
  557. }
  558. extension D2m_ServerInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  559. static let protoMessageName: String = _protobuf_package + ".ServerInfo"
  560. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  561. 1: .standard(proto: "max_device_slots"),
  562. 2: .standard(proto: "device_slot_state"),
  563. 3: .standard(proto: "encrypted_shared_device_data"),
  564. ]
  565. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  566. while let fieldNumber = try decoder.nextFieldNumber() {
  567. switch fieldNumber {
  568. case 1: try decoder.decodeSingularUInt32Field(value: &self.maxDeviceSlots)
  569. case 2: try decoder.decodeSingularEnumField(value: &self.deviceSlotState)
  570. case 3: try decoder.decodeSingularBytesField(value: &self.encryptedSharedDeviceData)
  571. default: break
  572. }
  573. }
  574. }
  575. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  576. if self.maxDeviceSlots != 0 {
  577. try visitor.visitSingularUInt32Field(value: self.maxDeviceSlots, fieldNumber: 1)
  578. }
  579. if self.deviceSlotState != .new {
  580. try visitor.visitSingularEnumField(value: self.deviceSlotState, fieldNumber: 2)
  581. }
  582. if !self.encryptedSharedDeviceData.isEmpty {
  583. try visitor.visitSingularBytesField(value: self.encryptedSharedDeviceData, fieldNumber: 3)
  584. }
  585. try unknownFields.traverse(visitor: &visitor)
  586. }
  587. static func ==(lhs: D2m_ServerInfo, rhs: D2m_ServerInfo) -> Bool {
  588. if lhs.maxDeviceSlots != rhs.maxDeviceSlots {return false}
  589. if lhs.deviceSlotState != rhs.deviceSlotState {return false}
  590. if lhs.encryptedSharedDeviceData != rhs.encryptedSharedDeviceData {return false}
  591. if lhs.unknownFields != rhs.unknownFields {return false}
  592. return true
  593. }
  594. }
  595. extension D2m_ServerInfo.DeviceSlotState: SwiftProtobuf._ProtoNameProviding {
  596. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  597. 0: .same(proto: "NEW"),
  598. 1: .same(proto: "EXISTING"),
  599. ]
  600. }
  601. extension D2m_ReflectionQueueDry: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  602. static let protoMessageName: String = _protobuf_package + ".ReflectionQueueDry"
  603. static let _protobuf_nameMap = SwiftProtobuf._NameMap()
  604. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  605. while let _ = try decoder.nextFieldNumber() {
  606. }
  607. }
  608. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  609. try unknownFields.traverse(visitor: &visitor)
  610. }
  611. static func ==(lhs: D2m_ReflectionQueueDry, rhs: D2m_ReflectionQueueDry) -> Bool {
  612. if lhs.unknownFields != rhs.unknownFields {return false}
  613. return true
  614. }
  615. }
  616. extension D2m_RolePromotedToLeader: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  617. static let protoMessageName: String = _protobuf_package + ".RolePromotedToLeader"
  618. static let _protobuf_nameMap = SwiftProtobuf._NameMap()
  619. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  620. while let _ = try decoder.nextFieldNumber() {
  621. }
  622. }
  623. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  624. try unknownFields.traverse(visitor: &visitor)
  625. }
  626. static func ==(lhs: D2m_RolePromotedToLeader, rhs: D2m_RolePromotedToLeader) -> Bool {
  627. if lhs.unknownFields != rhs.unknownFields {return false}
  628. return true
  629. }
  630. }
  631. extension D2m_GetDevicesInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  632. static let protoMessageName: String = _protobuf_package + ".GetDevicesInfo"
  633. static let _protobuf_nameMap = SwiftProtobuf._NameMap()
  634. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  635. while let _ = try decoder.nextFieldNumber() {
  636. }
  637. }
  638. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  639. try unknownFields.traverse(visitor: &visitor)
  640. }
  641. static func ==(lhs: D2m_GetDevicesInfo, rhs: D2m_GetDevicesInfo) -> Bool {
  642. if lhs.unknownFields != rhs.unknownFields {return false}
  643. return true
  644. }
  645. }
  646. extension D2m_DevicesInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  647. static let protoMessageName: String = _protobuf_package + ".DevicesInfo"
  648. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  649. 1: .standard(proto: "augmented_device_info"),
  650. ]
  651. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  652. while let fieldNumber = try decoder.nextFieldNumber() {
  653. switch fieldNumber {
  654. case 1: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap<SwiftProtobuf.ProtobufFixed64,D2m_DevicesInfo.AugmentedDeviceInfo>.self, value: &self.augmentedDeviceInfo)
  655. default: break
  656. }
  657. }
  658. }
  659. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  660. if !self.augmentedDeviceInfo.isEmpty {
  661. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap<SwiftProtobuf.ProtobufFixed64,D2m_DevicesInfo.AugmentedDeviceInfo>.self, value: self.augmentedDeviceInfo, fieldNumber: 1)
  662. }
  663. try unknownFields.traverse(visitor: &visitor)
  664. }
  665. static func ==(lhs: D2m_DevicesInfo, rhs: D2m_DevicesInfo) -> Bool {
  666. if lhs.augmentedDeviceInfo != rhs.augmentedDeviceInfo {return false}
  667. if lhs.unknownFields != rhs.unknownFields {return false}
  668. return true
  669. }
  670. }
  671. extension D2m_DevicesInfo.AugmentedDeviceInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  672. static let protoMessageName: String = D2m_DevicesInfo.protoMessageName + ".AugmentedDeviceInfo"
  673. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  674. 1: .standard(proto: "encrypted_device_info"),
  675. 2: .standard(proto: "last_login_at"),
  676. 3: .standard(proto: "device_slot_expiration_policy"),
  677. ]
  678. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  679. while let fieldNumber = try decoder.nextFieldNumber() {
  680. switch fieldNumber {
  681. case 1: try decoder.decodeSingularBytesField(value: &self.encryptedDeviceInfo)
  682. case 2: try decoder.decodeSingularUInt64Field(value: &self.lastLoginAt)
  683. case 3: try decoder.decodeSingularEnumField(value: &self.deviceSlotExpirationPolicy)
  684. default: break
  685. }
  686. }
  687. }
  688. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  689. if !self.encryptedDeviceInfo.isEmpty {
  690. try visitor.visitSingularBytesField(value: self.encryptedDeviceInfo, fieldNumber: 1)
  691. }
  692. if self.lastLoginAt != 0 {
  693. try visitor.visitSingularUInt64Field(value: self.lastLoginAt, fieldNumber: 2)
  694. }
  695. if self.deviceSlotExpirationPolicy != .volatile {
  696. try visitor.visitSingularEnumField(value: self.deviceSlotExpirationPolicy, fieldNumber: 3)
  697. }
  698. try unknownFields.traverse(visitor: &visitor)
  699. }
  700. static func ==(lhs: D2m_DevicesInfo.AugmentedDeviceInfo, rhs: D2m_DevicesInfo.AugmentedDeviceInfo) -> Bool {
  701. if lhs.encryptedDeviceInfo != rhs.encryptedDeviceInfo {return false}
  702. if lhs.lastLoginAt != rhs.lastLoginAt {return false}
  703. if lhs.deviceSlotExpirationPolicy != rhs.deviceSlotExpirationPolicy {return false}
  704. if lhs.unknownFields != rhs.unknownFields {return false}
  705. return true
  706. }
  707. }
  708. extension D2m_DropDevice: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  709. static let protoMessageName: String = _protobuf_package + ".DropDevice"
  710. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  711. 1: .standard(proto: "device_id"),
  712. ]
  713. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  714. while let fieldNumber = try decoder.nextFieldNumber() {
  715. switch fieldNumber {
  716. case 1: try decoder.decodeSingularFixed64Field(value: &self.deviceID)
  717. default: break
  718. }
  719. }
  720. }
  721. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  722. if self.deviceID != 0 {
  723. try visitor.visitSingularFixed64Field(value: self.deviceID, fieldNumber: 1)
  724. }
  725. try unknownFields.traverse(visitor: &visitor)
  726. }
  727. static func ==(lhs: D2m_DropDevice, rhs: D2m_DropDevice) -> Bool {
  728. if lhs.deviceID != rhs.deviceID {return false}
  729. if lhs.unknownFields != rhs.unknownFields {return false}
  730. return true
  731. }
  732. }
  733. extension D2m_DropDeviceAck: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  734. static let protoMessageName: String = _protobuf_package + ".DropDeviceAck"
  735. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  736. 1: .standard(proto: "device_id"),
  737. ]
  738. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  739. while let fieldNumber = try decoder.nextFieldNumber() {
  740. switch fieldNumber {
  741. case 1: try decoder.decodeSingularFixed64Field(value: &self.deviceID)
  742. default: break
  743. }
  744. }
  745. }
  746. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  747. if self.deviceID != 0 {
  748. try visitor.visitSingularFixed64Field(value: self.deviceID, fieldNumber: 1)
  749. }
  750. try unknownFields.traverse(visitor: &visitor)
  751. }
  752. static func ==(lhs: D2m_DropDeviceAck, rhs: D2m_DropDeviceAck) -> Bool {
  753. if lhs.deviceID != rhs.deviceID {return false}
  754. if lhs.unknownFields != rhs.unknownFields {return false}
  755. return true
  756. }
  757. }
  758. extension D2m_SetSharedDeviceData: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  759. static let protoMessageName: String = _protobuf_package + ".SetSharedDeviceData"
  760. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  761. 1: .standard(proto: "encrypted_shared_device_data"),
  762. ]
  763. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  764. while let fieldNumber = try decoder.nextFieldNumber() {
  765. switch fieldNumber {
  766. case 1: try decoder.decodeSingularBytesField(value: &self.encryptedSharedDeviceData)
  767. default: break
  768. }
  769. }
  770. }
  771. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  772. if !self.encryptedSharedDeviceData.isEmpty {
  773. try visitor.visitSingularBytesField(value: self.encryptedSharedDeviceData, fieldNumber: 1)
  774. }
  775. try unknownFields.traverse(visitor: &visitor)
  776. }
  777. static func ==(lhs: D2m_SetSharedDeviceData, rhs: D2m_SetSharedDeviceData) -> Bool {
  778. if lhs.encryptedSharedDeviceData != rhs.encryptedSharedDeviceData {return false}
  779. if lhs.unknownFields != rhs.unknownFields {return false}
  780. return true
  781. }
  782. }
  783. extension D2m_BeginTransaction: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  784. static let protoMessageName: String = _protobuf_package + ".BeginTransaction"
  785. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  786. 1: .standard(proto: "encrypted_scope"),
  787. ]
  788. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  789. while let fieldNumber = try decoder.nextFieldNumber() {
  790. switch fieldNumber {
  791. case 1: try decoder.decodeSingularBytesField(value: &self.encryptedScope)
  792. default: break
  793. }
  794. }
  795. }
  796. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  797. if !self.encryptedScope.isEmpty {
  798. try visitor.visitSingularBytesField(value: self.encryptedScope, fieldNumber: 1)
  799. }
  800. try unknownFields.traverse(visitor: &visitor)
  801. }
  802. static func ==(lhs: D2m_BeginTransaction, rhs: D2m_BeginTransaction) -> Bool {
  803. if lhs.encryptedScope != rhs.encryptedScope {return false}
  804. if lhs.unknownFields != rhs.unknownFields {return false}
  805. return true
  806. }
  807. }
  808. extension D2m_BeginTransactionAck: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  809. static let protoMessageName: String = _protobuf_package + ".BeginTransactionAck"
  810. static let _protobuf_nameMap = SwiftProtobuf._NameMap()
  811. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  812. while let _ = try decoder.nextFieldNumber() {
  813. }
  814. }
  815. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  816. try unknownFields.traverse(visitor: &visitor)
  817. }
  818. static func ==(lhs: D2m_BeginTransactionAck, rhs: D2m_BeginTransactionAck) -> Bool {
  819. if lhs.unknownFields != rhs.unknownFields {return false}
  820. return true
  821. }
  822. }
  823. extension D2m_CommitTransaction: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  824. static let protoMessageName: String = _protobuf_package + ".CommitTransaction"
  825. static let _protobuf_nameMap = SwiftProtobuf._NameMap()
  826. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  827. while let _ = try decoder.nextFieldNumber() {
  828. }
  829. }
  830. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  831. try unknownFields.traverse(visitor: &visitor)
  832. }
  833. static func ==(lhs: D2m_CommitTransaction, rhs: D2m_CommitTransaction) -> Bool {
  834. if lhs.unknownFields != rhs.unknownFields {return false}
  835. return true
  836. }
  837. }
  838. extension D2m_CommitTransactionAck: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  839. static let protoMessageName: String = _protobuf_package + ".CommitTransactionAck"
  840. static let _protobuf_nameMap = SwiftProtobuf._NameMap()
  841. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  842. while let _ = try decoder.nextFieldNumber() {
  843. }
  844. }
  845. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  846. try unknownFields.traverse(visitor: &visitor)
  847. }
  848. static func ==(lhs: D2m_CommitTransactionAck, rhs: D2m_CommitTransactionAck) -> Bool {
  849. if lhs.unknownFields != rhs.unknownFields {return false}
  850. return true
  851. }
  852. }
  853. extension D2m_TransactionRejected: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  854. static let protoMessageName: String = _protobuf_package + ".TransactionRejected"
  855. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  856. 1: .standard(proto: "device_id"),
  857. 2: .standard(proto: "encrypted_scope"),
  858. ]
  859. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  860. while let fieldNumber = try decoder.nextFieldNumber() {
  861. switch fieldNumber {
  862. case 1: try decoder.decodeSingularFixed64Field(value: &self.deviceID)
  863. case 2: try decoder.decodeSingularBytesField(value: &self.encryptedScope)
  864. default: break
  865. }
  866. }
  867. }
  868. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  869. if self.deviceID != 0 {
  870. try visitor.visitSingularFixed64Field(value: self.deviceID, fieldNumber: 1)
  871. }
  872. if !self.encryptedScope.isEmpty {
  873. try visitor.visitSingularBytesField(value: self.encryptedScope, fieldNumber: 2)
  874. }
  875. try unknownFields.traverse(visitor: &visitor)
  876. }
  877. static func ==(lhs: D2m_TransactionRejected, rhs: D2m_TransactionRejected) -> Bool {
  878. if lhs.deviceID != rhs.deviceID {return false}
  879. if lhs.encryptedScope != rhs.encryptedScope {return false}
  880. if lhs.unknownFields != rhs.unknownFields {return false}
  881. return true
  882. }
  883. }
  884. extension D2m_TransactionEnded: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  885. static let protoMessageName: String = _protobuf_package + ".TransactionEnded"
  886. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  887. 1: .standard(proto: "device_id"),
  888. 2: .standard(proto: "encrypted_scope"),
  889. ]
  890. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  891. while let fieldNumber = try decoder.nextFieldNumber() {
  892. switch fieldNumber {
  893. case 1: try decoder.decodeSingularFixed64Field(value: &self.deviceID)
  894. case 2: try decoder.decodeSingularBytesField(value: &self.encryptedScope)
  895. default: break
  896. }
  897. }
  898. }
  899. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  900. if self.deviceID != 0 {
  901. try visitor.visitSingularFixed64Field(value: self.deviceID, fieldNumber: 1)
  902. }
  903. if !self.encryptedScope.isEmpty {
  904. try visitor.visitSingularBytesField(value: self.encryptedScope, fieldNumber: 2)
  905. }
  906. try unknownFields.traverse(visitor: &visitor)
  907. }
  908. static func ==(lhs: D2m_TransactionEnded, rhs: D2m_TransactionEnded) -> Bool {
  909. if lhs.deviceID != rhs.deviceID {return false}
  910. if lhs.encryptedScope != rhs.encryptedScope {return false}
  911. if lhs.unknownFields != rhs.unknownFields {return false}
  912. return true
  913. }
  914. }