bledata.pb.swift 66 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728
  1. // DO NOT EDIT.
  2. // swift-format-ignore-file
  3. //
  4. // Generated by the Swift generator plugin for the protocol buffer compiler.
  5. // Source: bledata.proto
  6. //
  7. // For information on using the generated types, please see the documentation:
  8. // https://github.com/apple/swift-protobuf/
  9. import Foundation
  10. import SwiftProtobuf
  11. // If the compiler emits an error on this type, it is because this file
  12. // was generated by a version of the `protoc` Swift plug-in that is
  13. // incompatible with the version of SwiftProtobuf to which you are linking.
  14. // Please ensure that you are building against the same version of the API
  15. // that was used to generate this file.
  16. fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
  17. struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
  18. typealias Version = _2
  19. }
  20. struct ScanForDevicesRequest {
  21. // SwiftProtobuf.Message conformance is added in an extension below. See the
  22. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  23. // methods supported on all messages.
  24. var serviceUuids: [Uuid] = []
  25. var scanMode: Int32 = 0
  26. var requireLocationServicesEnabled: Bool = false
  27. var unknownFields = SwiftProtobuf.UnknownStorage()
  28. init() {}
  29. }
  30. struct DeviceScanInfo {
  31. // SwiftProtobuf.Message conformance is added in an extension below. See the
  32. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  33. // methods supported on all messages.
  34. var id: String = String()
  35. var name: String = String()
  36. var failure: GenericFailure {
  37. get {return _failure ?? GenericFailure()}
  38. set {_failure = newValue}
  39. }
  40. /// Returns true if `failure` has been explicitly set.
  41. var hasFailure: Bool {return self._failure != nil}
  42. /// Clears the value of `failure`. Subsequent reads from it will return its default value.
  43. mutating func clearFailure() {self._failure = nil}
  44. var serviceData: [ServiceDataEntry] = []
  45. var manufacturerData: Data = Data()
  46. var serviceUuids: [Uuid] = []
  47. var rssi: Int32 = 0
  48. var unknownFields = SwiftProtobuf.UnknownStorage()
  49. init() {}
  50. fileprivate var _failure: GenericFailure? = nil
  51. }
  52. struct ConnectToDeviceRequest {
  53. // SwiftProtobuf.Message conformance is added in an extension below. See the
  54. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  55. // methods supported on all messages.
  56. var deviceID: String = String()
  57. var servicesWithCharacteristicsToDiscover: ServicesWithCharacteristics {
  58. get {return _servicesWithCharacteristicsToDiscover ?? ServicesWithCharacteristics()}
  59. set {_servicesWithCharacteristicsToDiscover = newValue}
  60. }
  61. /// Returns true if `servicesWithCharacteristicsToDiscover` has been explicitly set.
  62. var hasServicesWithCharacteristicsToDiscover: Bool {return self._servicesWithCharacteristicsToDiscover != nil}
  63. /// Clears the value of `servicesWithCharacteristicsToDiscover`. Subsequent reads from it will return its default value.
  64. mutating func clearServicesWithCharacteristicsToDiscover() {self._servicesWithCharacteristicsToDiscover = nil}
  65. var timeoutInMs: Int32 = 0
  66. var unknownFields = SwiftProtobuf.UnknownStorage()
  67. init() {}
  68. fileprivate var _servicesWithCharacteristicsToDiscover: ServicesWithCharacteristics? = nil
  69. }
  70. struct DeviceInfo {
  71. // SwiftProtobuf.Message conformance is added in an extension below. See the
  72. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  73. // methods supported on all messages.
  74. var id: String = String()
  75. var connectionState: Int32 = 0
  76. var failure: GenericFailure {
  77. get {return _failure ?? GenericFailure()}
  78. set {_failure = newValue}
  79. }
  80. /// Returns true if `failure` has been explicitly set.
  81. var hasFailure: Bool {return self._failure != nil}
  82. /// Clears the value of `failure`. Subsequent reads from it will return its default value.
  83. mutating func clearFailure() {self._failure = nil}
  84. var unknownFields = SwiftProtobuf.UnknownStorage()
  85. init() {}
  86. fileprivate var _failure: GenericFailure? = nil
  87. }
  88. struct DisconnectFromDeviceRequest {
  89. // SwiftProtobuf.Message conformance is added in an extension below. See the
  90. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  91. // methods supported on all messages.
  92. var deviceID: String = String()
  93. var unknownFields = SwiftProtobuf.UnknownStorage()
  94. init() {}
  95. }
  96. struct ClearGattCacheRequest {
  97. // SwiftProtobuf.Message conformance is added in an extension below. See the
  98. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  99. // methods supported on all messages.
  100. var deviceID: String = String()
  101. var unknownFields = SwiftProtobuf.UnknownStorage()
  102. init() {}
  103. }
  104. struct ClearGattCacheInfo {
  105. // SwiftProtobuf.Message conformance is added in an extension below. See the
  106. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  107. // methods supported on all messages.
  108. var failure: GenericFailure {
  109. get {return _failure ?? GenericFailure()}
  110. set {_failure = newValue}
  111. }
  112. /// Returns true if `failure` has been explicitly set.
  113. var hasFailure: Bool {return self._failure != nil}
  114. /// Clears the value of `failure`. Subsequent reads from it will return its default value.
  115. mutating func clearFailure() {self._failure = nil}
  116. var unknownFields = SwiftProtobuf.UnknownStorage()
  117. init() {}
  118. fileprivate var _failure: GenericFailure? = nil
  119. }
  120. struct NotifyCharacteristicRequest {
  121. // SwiftProtobuf.Message conformance is added in an extension below. See the
  122. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  123. // methods supported on all messages.
  124. var characteristic: CharacteristicAddress {
  125. get {return _characteristic ?? CharacteristicAddress()}
  126. set {_characteristic = newValue}
  127. }
  128. /// Returns true if `characteristic` has been explicitly set.
  129. var hasCharacteristic: Bool {return self._characteristic != nil}
  130. /// Clears the value of `characteristic`. Subsequent reads from it will return its default value.
  131. mutating func clearCharacteristic() {self._characteristic = nil}
  132. var unknownFields = SwiftProtobuf.UnknownStorage()
  133. init() {}
  134. fileprivate var _characteristic: CharacteristicAddress? = nil
  135. }
  136. struct NotifyNoMoreCharacteristicRequest {
  137. // SwiftProtobuf.Message conformance is added in an extension below. See the
  138. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  139. // methods supported on all messages.
  140. var characteristic: CharacteristicAddress {
  141. get {return _characteristic ?? CharacteristicAddress()}
  142. set {_characteristic = newValue}
  143. }
  144. /// Returns true if `characteristic` has been explicitly set.
  145. var hasCharacteristic: Bool {return self._characteristic != nil}
  146. /// Clears the value of `characteristic`. Subsequent reads from it will return its default value.
  147. mutating func clearCharacteristic() {self._characteristic = nil}
  148. var unknownFields = SwiftProtobuf.UnknownStorage()
  149. init() {}
  150. fileprivate var _characteristic: CharacteristicAddress? = nil
  151. }
  152. struct ReadCharacteristicRequest {
  153. // SwiftProtobuf.Message conformance is added in an extension below. See the
  154. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  155. // methods supported on all messages.
  156. var characteristic: CharacteristicAddress {
  157. get {return _characteristic ?? CharacteristicAddress()}
  158. set {_characteristic = newValue}
  159. }
  160. /// Returns true if `characteristic` has been explicitly set.
  161. var hasCharacteristic: Bool {return self._characteristic != nil}
  162. /// Clears the value of `characteristic`. Subsequent reads from it will return its default value.
  163. mutating func clearCharacteristic() {self._characteristic = nil}
  164. var unknownFields = SwiftProtobuf.UnknownStorage()
  165. init() {}
  166. fileprivate var _characteristic: CharacteristicAddress? = nil
  167. }
  168. struct CharacteristicValueInfo {
  169. // SwiftProtobuf.Message conformance is added in an extension below. See the
  170. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  171. // methods supported on all messages.
  172. var characteristic: CharacteristicAddress {
  173. get {return _characteristic ?? CharacteristicAddress()}
  174. set {_characteristic = newValue}
  175. }
  176. /// Returns true if `characteristic` has been explicitly set.
  177. var hasCharacteristic: Bool {return self._characteristic != nil}
  178. /// Clears the value of `characteristic`. Subsequent reads from it will return its default value.
  179. mutating func clearCharacteristic() {self._characteristic = nil}
  180. var value: Data = Data()
  181. var failure: GenericFailure {
  182. get {return _failure ?? GenericFailure()}
  183. set {_failure = newValue}
  184. }
  185. /// Returns true if `failure` has been explicitly set.
  186. var hasFailure: Bool {return self._failure != nil}
  187. /// Clears the value of `failure`. Subsequent reads from it will return its default value.
  188. mutating func clearFailure() {self._failure = nil}
  189. var unknownFields = SwiftProtobuf.UnknownStorage()
  190. init() {}
  191. fileprivate var _characteristic: CharacteristicAddress? = nil
  192. fileprivate var _failure: GenericFailure? = nil
  193. }
  194. struct WriteCharacteristicRequest {
  195. // SwiftProtobuf.Message conformance is added in an extension below. See the
  196. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  197. // methods supported on all messages.
  198. var characteristic: CharacteristicAddress {
  199. get {return _characteristic ?? CharacteristicAddress()}
  200. set {_characteristic = newValue}
  201. }
  202. /// Returns true if `characteristic` has been explicitly set.
  203. var hasCharacteristic: Bool {return self._characteristic != nil}
  204. /// Clears the value of `characteristic`. Subsequent reads from it will return its default value.
  205. mutating func clearCharacteristic() {self._characteristic = nil}
  206. var value: Data = Data()
  207. var unknownFields = SwiftProtobuf.UnknownStorage()
  208. init() {}
  209. fileprivate var _characteristic: CharacteristicAddress? = nil
  210. }
  211. struct WriteCharacteristicInfo {
  212. // SwiftProtobuf.Message conformance is added in an extension below. See the
  213. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  214. // methods supported on all messages.
  215. var characteristic: CharacteristicAddress {
  216. get {return _characteristic ?? CharacteristicAddress()}
  217. set {_characteristic = newValue}
  218. }
  219. /// Returns true if `characteristic` has been explicitly set.
  220. var hasCharacteristic: Bool {return self._characteristic != nil}
  221. /// Clears the value of `characteristic`. Subsequent reads from it will return its default value.
  222. mutating func clearCharacteristic() {self._characteristic = nil}
  223. var failure: GenericFailure {
  224. get {return _failure ?? GenericFailure()}
  225. set {_failure = newValue}
  226. }
  227. /// Returns true if `failure` has been explicitly set.
  228. var hasFailure: Bool {return self._failure != nil}
  229. /// Clears the value of `failure`. Subsequent reads from it will return its default value.
  230. mutating func clearFailure() {self._failure = nil}
  231. var unknownFields = SwiftProtobuf.UnknownStorage()
  232. init() {}
  233. fileprivate var _characteristic: CharacteristicAddress? = nil
  234. fileprivate var _failure: GenericFailure? = nil
  235. }
  236. struct NegotiateMtuRequest {
  237. // SwiftProtobuf.Message conformance is added in an extension below. See the
  238. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  239. // methods supported on all messages.
  240. var deviceID: String = String()
  241. var mtuSize: Int32 = 0
  242. var unknownFields = SwiftProtobuf.UnknownStorage()
  243. init() {}
  244. }
  245. struct NegotiateMtuInfo {
  246. // SwiftProtobuf.Message conformance is added in an extension below. See the
  247. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  248. // methods supported on all messages.
  249. var deviceID: String = String()
  250. var mtuSize: Int32 = 0
  251. var failure: GenericFailure {
  252. get {return _failure ?? GenericFailure()}
  253. set {_failure = newValue}
  254. }
  255. /// Returns true if `failure` has been explicitly set.
  256. var hasFailure: Bool {return self._failure != nil}
  257. /// Clears the value of `failure`. Subsequent reads from it will return its default value.
  258. mutating func clearFailure() {self._failure = nil}
  259. var unknownFields = SwiftProtobuf.UnknownStorage()
  260. init() {}
  261. fileprivate var _failure: GenericFailure? = nil
  262. }
  263. struct BleStatusInfo {
  264. // SwiftProtobuf.Message conformance is added in an extension below. See the
  265. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  266. // methods supported on all messages.
  267. var status: Int32 = 0
  268. var unknownFields = SwiftProtobuf.UnknownStorage()
  269. init() {}
  270. }
  271. struct ChangeConnectionPriorityRequest {
  272. // SwiftProtobuf.Message conformance is added in an extension below. See the
  273. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  274. // methods supported on all messages.
  275. var deviceID: String = String()
  276. var priority: Int32 = 0
  277. var unknownFields = SwiftProtobuf.UnknownStorage()
  278. init() {}
  279. }
  280. struct ChangeConnectionPriorityInfo {
  281. // SwiftProtobuf.Message conformance is added in an extension below. See the
  282. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  283. // methods supported on all messages.
  284. var deviceID: String = String()
  285. var failure: GenericFailure {
  286. get {return _failure ?? GenericFailure()}
  287. set {_failure = newValue}
  288. }
  289. /// Returns true if `failure` has been explicitly set.
  290. var hasFailure: Bool {return self._failure != nil}
  291. /// Clears the value of `failure`. Subsequent reads from it will return its default value.
  292. mutating func clearFailure() {self._failure = nil}
  293. var unknownFields = SwiftProtobuf.UnknownStorage()
  294. init() {}
  295. fileprivate var _failure: GenericFailure? = nil
  296. }
  297. struct CharacteristicAddress {
  298. // SwiftProtobuf.Message conformance is added in an extension below. See the
  299. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  300. // methods supported on all messages.
  301. var deviceID: String = String()
  302. var serviceUuid: Uuid {
  303. get {return _serviceUuid ?? Uuid()}
  304. set {_serviceUuid = newValue}
  305. }
  306. /// Returns true if `serviceUuid` has been explicitly set.
  307. var hasServiceUuid: Bool {return self._serviceUuid != nil}
  308. /// Clears the value of `serviceUuid`. Subsequent reads from it will return its default value.
  309. mutating func clearServiceUuid() {self._serviceUuid = nil}
  310. var characteristicUuid: Uuid {
  311. get {return _characteristicUuid ?? Uuid()}
  312. set {_characteristicUuid = newValue}
  313. }
  314. /// Returns true if `characteristicUuid` has been explicitly set.
  315. var hasCharacteristicUuid: Bool {return self._characteristicUuid != nil}
  316. /// Clears the value of `characteristicUuid`. Subsequent reads from it will return its default value.
  317. mutating func clearCharacteristicUuid() {self._characteristicUuid = nil}
  318. var unknownFields = SwiftProtobuf.UnknownStorage()
  319. init() {}
  320. fileprivate var _serviceUuid: Uuid? = nil
  321. fileprivate var _characteristicUuid: Uuid? = nil
  322. }
  323. struct ServiceDataEntry {
  324. // SwiftProtobuf.Message conformance is added in an extension below. See the
  325. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  326. // methods supported on all messages.
  327. var serviceUuid: Uuid {
  328. get {return _serviceUuid ?? Uuid()}
  329. set {_serviceUuid = newValue}
  330. }
  331. /// Returns true if `serviceUuid` has been explicitly set.
  332. var hasServiceUuid: Bool {return self._serviceUuid != nil}
  333. /// Clears the value of `serviceUuid`. Subsequent reads from it will return its default value.
  334. mutating func clearServiceUuid() {self._serviceUuid = nil}
  335. var data: Data = Data()
  336. var unknownFields = SwiftProtobuf.UnknownStorage()
  337. init() {}
  338. fileprivate var _serviceUuid: Uuid? = nil
  339. }
  340. struct ServicesWithCharacteristics {
  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. var items: [ServiceWithCharacteristics] = []
  345. var unknownFields = SwiftProtobuf.UnknownStorage()
  346. init() {}
  347. }
  348. struct ServiceWithCharacteristics {
  349. // SwiftProtobuf.Message conformance is added in an extension below. See the
  350. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  351. // methods supported on all messages.
  352. var serviceID: Uuid {
  353. get {return _serviceID ?? Uuid()}
  354. set {_serviceID = newValue}
  355. }
  356. /// Returns true if `serviceID` has been explicitly set.
  357. var hasServiceID: Bool {return self._serviceID != nil}
  358. /// Clears the value of `serviceID`. Subsequent reads from it will return its default value.
  359. mutating func clearServiceID() {self._serviceID = nil}
  360. var characteristics: [Uuid] = []
  361. var unknownFields = SwiftProtobuf.UnknownStorage()
  362. init() {}
  363. fileprivate var _serviceID: Uuid? = nil
  364. }
  365. struct DiscoverServicesRequest {
  366. // SwiftProtobuf.Message conformance is added in an extension below. See the
  367. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  368. // methods supported on all messages.
  369. var deviceID: String = String()
  370. var unknownFields = SwiftProtobuf.UnknownStorage()
  371. init() {}
  372. }
  373. struct DiscoverServicesInfo {
  374. // SwiftProtobuf.Message conformance is added in an extension below. See the
  375. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  376. // methods supported on all messages.
  377. var deviceID: String = String()
  378. var services: [DiscoveredService] = []
  379. var unknownFields = SwiftProtobuf.UnknownStorage()
  380. init() {}
  381. }
  382. struct DiscoveredService {
  383. // SwiftProtobuf.Message conformance is added in an extension below. See the
  384. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  385. // methods supported on all messages.
  386. var serviceUuid: Uuid {
  387. get {return _serviceUuid ?? Uuid()}
  388. set {_serviceUuid = newValue}
  389. }
  390. /// Returns true if `serviceUuid` has been explicitly set.
  391. var hasServiceUuid: Bool {return self._serviceUuid != nil}
  392. /// Clears the value of `serviceUuid`. Subsequent reads from it will return its default value.
  393. mutating func clearServiceUuid() {self._serviceUuid = nil}
  394. var characteristicUuids: [Uuid] = []
  395. var includedServices: [DiscoveredService] = []
  396. var characteristics: [DiscoveredCharacteristic] = []
  397. var unknownFields = SwiftProtobuf.UnknownStorage()
  398. init() {}
  399. fileprivate var _serviceUuid: Uuid? = nil
  400. }
  401. struct DiscoveredCharacteristic {
  402. // SwiftProtobuf.Message conformance is added in an extension below. See the
  403. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  404. // methods supported on all messages.
  405. var characteristicID: Uuid {
  406. get {return _characteristicID ?? Uuid()}
  407. set {_characteristicID = newValue}
  408. }
  409. /// Returns true if `characteristicID` has been explicitly set.
  410. var hasCharacteristicID: Bool {return self._characteristicID != nil}
  411. /// Clears the value of `characteristicID`. Subsequent reads from it will return its default value.
  412. mutating func clearCharacteristicID() {self._characteristicID = nil}
  413. var serviceID: Uuid {
  414. get {return _serviceID ?? Uuid()}
  415. set {_serviceID = newValue}
  416. }
  417. /// Returns true if `serviceID` has been explicitly set.
  418. var hasServiceID: Bool {return self._serviceID != nil}
  419. /// Clears the value of `serviceID`. Subsequent reads from it will return its default value.
  420. mutating func clearServiceID() {self._serviceID = nil}
  421. var isReadable: Bool = false
  422. var isWritableWithResponse: Bool = false
  423. var isWritableWithoutResponse: Bool = false
  424. var isNotifiable: Bool = false
  425. var isIndicatable: Bool = false
  426. var unknownFields = SwiftProtobuf.UnknownStorage()
  427. init() {}
  428. fileprivate var _characteristicID: Uuid? = nil
  429. fileprivate var _serviceID: Uuid? = nil
  430. }
  431. struct Uuid {
  432. // SwiftProtobuf.Message conformance is added in an extension below. See the
  433. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  434. // methods supported on all messages.
  435. var data: Data = Data()
  436. var unknownFields = SwiftProtobuf.UnknownStorage()
  437. init() {}
  438. }
  439. struct GenericFailure {
  440. // SwiftProtobuf.Message conformance is added in an extension below. See the
  441. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  442. // methods supported on all messages.
  443. var code: Int32 = 0
  444. var message: String = String()
  445. var unknownFields = SwiftProtobuf.UnknownStorage()
  446. init() {}
  447. }
  448. // MARK: - Code below here is support for the SwiftProtobuf runtime.
  449. extension ScanForDevicesRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  450. static let protoMessageName: String = "ScanForDevicesRequest"
  451. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  452. 1: .same(proto: "serviceUuids"),
  453. 2: .same(proto: "scanMode"),
  454. 3: .same(proto: "requireLocationServicesEnabled"),
  455. ]
  456. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  457. while let fieldNumber = try decoder.nextFieldNumber() {
  458. // The use of inline closures is to circumvent an issue where the compiler
  459. // allocates stack space for every case branch when no optimizations are
  460. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  461. switch fieldNumber {
  462. case 1: try { try decoder.decodeRepeatedMessageField(value: &self.serviceUuids) }()
  463. case 2: try { try decoder.decodeSingularInt32Field(value: &self.scanMode) }()
  464. case 3: try { try decoder.decodeSingularBoolField(value: &self.requireLocationServicesEnabled) }()
  465. default: break
  466. }
  467. }
  468. }
  469. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  470. if !self.serviceUuids.isEmpty {
  471. try visitor.visitRepeatedMessageField(value: self.serviceUuids, fieldNumber: 1)
  472. }
  473. if self.scanMode != 0 {
  474. try visitor.visitSingularInt32Field(value: self.scanMode, fieldNumber: 2)
  475. }
  476. if self.requireLocationServicesEnabled != false {
  477. try visitor.visitSingularBoolField(value: self.requireLocationServicesEnabled, fieldNumber: 3)
  478. }
  479. try unknownFields.traverse(visitor: &visitor)
  480. }
  481. static func ==(lhs: ScanForDevicesRequest, rhs: ScanForDevicesRequest) -> Bool {
  482. if lhs.serviceUuids != rhs.serviceUuids {return false}
  483. if lhs.scanMode != rhs.scanMode {return false}
  484. if lhs.requireLocationServicesEnabled != rhs.requireLocationServicesEnabled {return false}
  485. if lhs.unknownFields != rhs.unknownFields {return false}
  486. return true
  487. }
  488. }
  489. extension DeviceScanInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  490. static let protoMessageName: String = "DeviceScanInfo"
  491. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  492. 1: .same(proto: "id"),
  493. 2: .same(proto: "name"),
  494. 3: .same(proto: "failure"),
  495. 4: .same(proto: "serviceData"),
  496. 6: .same(proto: "manufacturerData"),
  497. 7: .same(proto: "serviceUuids"),
  498. 5: .same(proto: "rssi"),
  499. ]
  500. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  501. while let fieldNumber = try decoder.nextFieldNumber() {
  502. // The use of inline closures is to circumvent an issue where the compiler
  503. // allocates stack space for every case branch when no optimizations are
  504. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  505. switch fieldNumber {
  506. case 1: try { try decoder.decodeSingularStringField(value: &self.id) }()
  507. case 2: try { try decoder.decodeSingularStringField(value: &self.name) }()
  508. case 3: try { try decoder.decodeSingularMessageField(value: &self._failure) }()
  509. case 4: try { try decoder.decodeRepeatedMessageField(value: &self.serviceData) }()
  510. case 5: try { try decoder.decodeSingularInt32Field(value: &self.rssi) }()
  511. case 6: try { try decoder.decodeSingularBytesField(value: &self.manufacturerData) }()
  512. case 7: try { try decoder.decodeRepeatedMessageField(value: &self.serviceUuids) }()
  513. default: break
  514. }
  515. }
  516. }
  517. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  518. if !self.id.isEmpty {
  519. try visitor.visitSingularStringField(value: self.id, fieldNumber: 1)
  520. }
  521. if !self.name.isEmpty {
  522. try visitor.visitSingularStringField(value: self.name, fieldNumber: 2)
  523. }
  524. if let v = self._failure {
  525. try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
  526. }
  527. if !self.serviceData.isEmpty {
  528. try visitor.visitRepeatedMessageField(value: self.serviceData, fieldNumber: 4)
  529. }
  530. if self.rssi != 0 {
  531. try visitor.visitSingularInt32Field(value: self.rssi, fieldNumber: 5)
  532. }
  533. if !self.manufacturerData.isEmpty {
  534. try visitor.visitSingularBytesField(value: self.manufacturerData, fieldNumber: 6)
  535. }
  536. if !self.serviceUuids.isEmpty {
  537. try visitor.visitRepeatedMessageField(value: self.serviceUuids, fieldNumber: 7)
  538. }
  539. try unknownFields.traverse(visitor: &visitor)
  540. }
  541. static func ==(lhs: DeviceScanInfo, rhs: DeviceScanInfo) -> Bool {
  542. if lhs.id != rhs.id {return false}
  543. if lhs.name != rhs.name {return false}
  544. if lhs._failure != rhs._failure {return false}
  545. if lhs.serviceData != rhs.serviceData {return false}
  546. if lhs.manufacturerData != rhs.manufacturerData {return false}
  547. if lhs.serviceUuids != rhs.serviceUuids {return false}
  548. if lhs.rssi != rhs.rssi {return false}
  549. if lhs.unknownFields != rhs.unknownFields {return false}
  550. return true
  551. }
  552. }
  553. extension ConnectToDeviceRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  554. static let protoMessageName: String = "ConnectToDeviceRequest"
  555. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  556. 1: .same(proto: "deviceId"),
  557. 2: .same(proto: "servicesWithCharacteristicsToDiscover"),
  558. 3: .same(proto: "timeoutInMs"),
  559. ]
  560. 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 { try decoder.decodeSingularStringField(value: &self.deviceID) }()
  567. case 2: try { try decoder.decodeSingularMessageField(value: &self._servicesWithCharacteristicsToDiscover) }()
  568. case 3: try { try decoder.decodeSingularInt32Field(value: &self.timeoutInMs) }()
  569. default: break
  570. }
  571. }
  572. }
  573. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  574. if !self.deviceID.isEmpty {
  575. try visitor.visitSingularStringField(value: self.deviceID, fieldNumber: 1)
  576. }
  577. if let v = self._servicesWithCharacteristicsToDiscover {
  578. try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
  579. }
  580. if self.timeoutInMs != 0 {
  581. try visitor.visitSingularInt32Field(value: self.timeoutInMs, fieldNumber: 3)
  582. }
  583. try unknownFields.traverse(visitor: &visitor)
  584. }
  585. static func ==(lhs: ConnectToDeviceRequest, rhs: ConnectToDeviceRequest) -> Bool {
  586. if lhs.deviceID != rhs.deviceID {return false}
  587. if lhs._servicesWithCharacteristicsToDiscover != rhs._servicesWithCharacteristicsToDiscover {return false}
  588. if lhs.timeoutInMs != rhs.timeoutInMs {return false}
  589. if lhs.unknownFields != rhs.unknownFields {return false}
  590. return true
  591. }
  592. }
  593. extension DeviceInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  594. static let protoMessageName: String = "DeviceInfo"
  595. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  596. 1: .same(proto: "id"),
  597. 2: .same(proto: "connectionState"),
  598. 3: .same(proto: "failure"),
  599. ]
  600. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  601. while let fieldNumber = try decoder.nextFieldNumber() {
  602. // The use of inline closures is to circumvent an issue where the compiler
  603. // allocates stack space for every case branch when no optimizations are
  604. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  605. switch fieldNumber {
  606. case 1: try { try decoder.decodeSingularStringField(value: &self.id) }()
  607. case 2: try { try decoder.decodeSingularInt32Field(value: &self.connectionState) }()
  608. case 3: try { try decoder.decodeSingularMessageField(value: &self._failure) }()
  609. default: break
  610. }
  611. }
  612. }
  613. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  614. if !self.id.isEmpty {
  615. try visitor.visitSingularStringField(value: self.id, fieldNumber: 1)
  616. }
  617. if self.connectionState != 0 {
  618. try visitor.visitSingularInt32Field(value: self.connectionState, fieldNumber: 2)
  619. }
  620. if let v = self._failure {
  621. try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
  622. }
  623. try unknownFields.traverse(visitor: &visitor)
  624. }
  625. static func ==(lhs: DeviceInfo, rhs: DeviceInfo) -> Bool {
  626. if lhs.id != rhs.id {return false}
  627. if lhs.connectionState != rhs.connectionState {return false}
  628. if lhs._failure != rhs._failure {return false}
  629. if lhs.unknownFields != rhs.unknownFields {return false}
  630. return true
  631. }
  632. }
  633. extension DisconnectFromDeviceRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  634. static let protoMessageName: String = "DisconnectFromDeviceRequest"
  635. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  636. 1: .same(proto: "deviceId"),
  637. ]
  638. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  639. while let fieldNumber = try decoder.nextFieldNumber() {
  640. // The use of inline closures is to circumvent an issue where the compiler
  641. // allocates stack space for every case branch when no optimizations are
  642. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  643. switch fieldNumber {
  644. case 1: try { try decoder.decodeSingularStringField(value: &self.deviceID) }()
  645. default: break
  646. }
  647. }
  648. }
  649. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  650. if !self.deviceID.isEmpty {
  651. try visitor.visitSingularStringField(value: self.deviceID, fieldNumber: 1)
  652. }
  653. try unknownFields.traverse(visitor: &visitor)
  654. }
  655. static func ==(lhs: DisconnectFromDeviceRequest, rhs: DisconnectFromDeviceRequest) -> Bool {
  656. if lhs.deviceID != rhs.deviceID {return false}
  657. if lhs.unknownFields != rhs.unknownFields {return false}
  658. return true
  659. }
  660. }
  661. extension ClearGattCacheRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  662. static let protoMessageName: String = "ClearGattCacheRequest"
  663. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  664. 1: .same(proto: "deviceId"),
  665. ]
  666. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  667. while let fieldNumber = try decoder.nextFieldNumber() {
  668. // The use of inline closures is to circumvent an issue where the compiler
  669. // allocates stack space for every case branch when no optimizations are
  670. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  671. switch fieldNumber {
  672. case 1: try { try decoder.decodeSingularStringField(value: &self.deviceID) }()
  673. default: break
  674. }
  675. }
  676. }
  677. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  678. if !self.deviceID.isEmpty {
  679. try visitor.visitSingularStringField(value: self.deviceID, fieldNumber: 1)
  680. }
  681. try unknownFields.traverse(visitor: &visitor)
  682. }
  683. static func ==(lhs: ClearGattCacheRequest, rhs: ClearGattCacheRequest) -> Bool {
  684. if lhs.deviceID != rhs.deviceID {return false}
  685. if lhs.unknownFields != rhs.unknownFields {return false}
  686. return true
  687. }
  688. }
  689. extension ClearGattCacheInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  690. static let protoMessageName: String = "ClearGattCacheInfo"
  691. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  692. 1: .same(proto: "failure"),
  693. ]
  694. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  695. while let fieldNumber = try decoder.nextFieldNumber() {
  696. // The use of inline closures is to circumvent an issue where the compiler
  697. // allocates stack space for every case branch when no optimizations are
  698. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  699. switch fieldNumber {
  700. case 1: try { try decoder.decodeSingularMessageField(value: &self._failure) }()
  701. default: break
  702. }
  703. }
  704. }
  705. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  706. if let v = self._failure {
  707. try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
  708. }
  709. try unknownFields.traverse(visitor: &visitor)
  710. }
  711. static func ==(lhs: ClearGattCacheInfo, rhs: ClearGattCacheInfo) -> Bool {
  712. if lhs._failure != rhs._failure {return false}
  713. if lhs.unknownFields != rhs.unknownFields {return false}
  714. return true
  715. }
  716. }
  717. extension NotifyCharacteristicRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  718. static let protoMessageName: String = "NotifyCharacteristicRequest"
  719. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  720. 1: .same(proto: "characteristic"),
  721. ]
  722. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  723. while let fieldNumber = try decoder.nextFieldNumber() {
  724. // The use of inline closures is to circumvent an issue where the compiler
  725. // allocates stack space for every case branch when no optimizations are
  726. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  727. switch fieldNumber {
  728. case 1: try { try decoder.decodeSingularMessageField(value: &self._characteristic) }()
  729. default: break
  730. }
  731. }
  732. }
  733. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  734. if let v = self._characteristic {
  735. try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
  736. }
  737. try unknownFields.traverse(visitor: &visitor)
  738. }
  739. static func ==(lhs: NotifyCharacteristicRequest, rhs: NotifyCharacteristicRequest) -> Bool {
  740. if lhs._characteristic != rhs._characteristic {return false}
  741. if lhs.unknownFields != rhs.unknownFields {return false}
  742. return true
  743. }
  744. }
  745. extension NotifyNoMoreCharacteristicRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  746. static let protoMessageName: String = "NotifyNoMoreCharacteristicRequest"
  747. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  748. 1: .same(proto: "characteristic"),
  749. ]
  750. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  751. while let fieldNumber = try decoder.nextFieldNumber() {
  752. // The use of inline closures is to circumvent an issue where the compiler
  753. // allocates stack space for every case branch when no optimizations are
  754. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  755. switch fieldNumber {
  756. case 1: try { try decoder.decodeSingularMessageField(value: &self._characteristic) }()
  757. default: break
  758. }
  759. }
  760. }
  761. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  762. if let v = self._characteristic {
  763. try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
  764. }
  765. try unknownFields.traverse(visitor: &visitor)
  766. }
  767. static func ==(lhs: NotifyNoMoreCharacteristicRequest, rhs: NotifyNoMoreCharacteristicRequest) -> Bool {
  768. if lhs._characteristic != rhs._characteristic {return false}
  769. if lhs.unknownFields != rhs.unknownFields {return false}
  770. return true
  771. }
  772. }
  773. extension ReadCharacteristicRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  774. static let protoMessageName: String = "ReadCharacteristicRequest"
  775. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  776. 1: .same(proto: "characteristic"),
  777. ]
  778. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  779. while let fieldNumber = try decoder.nextFieldNumber() {
  780. // The use of inline closures is to circumvent an issue where the compiler
  781. // allocates stack space for every case branch when no optimizations are
  782. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  783. switch fieldNumber {
  784. case 1: try { try decoder.decodeSingularMessageField(value: &self._characteristic) }()
  785. default: break
  786. }
  787. }
  788. }
  789. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  790. if let v = self._characteristic {
  791. try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
  792. }
  793. try unknownFields.traverse(visitor: &visitor)
  794. }
  795. static func ==(lhs: ReadCharacteristicRequest, rhs: ReadCharacteristicRequest) -> Bool {
  796. if lhs._characteristic != rhs._characteristic {return false}
  797. if lhs.unknownFields != rhs.unknownFields {return false}
  798. return true
  799. }
  800. }
  801. extension CharacteristicValueInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  802. static let protoMessageName: String = "CharacteristicValueInfo"
  803. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  804. 1: .same(proto: "characteristic"),
  805. 2: .same(proto: "value"),
  806. 3: .same(proto: "failure"),
  807. ]
  808. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  809. while let fieldNumber = try decoder.nextFieldNumber() {
  810. // The use of inline closures is to circumvent an issue where the compiler
  811. // allocates stack space for every case branch when no optimizations are
  812. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  813. switch fieldNumber {
  814. case 1: try { try decoder.decodeSingularMessageField(value: &self._characteristic) }()
  815. case 2: try { try decoder.decodeSingularBytesField(value: &self.value) }()
  816. case 3: try { try decoder.decodeSingularMessageField(value: &self._failure) }()
  817. default: break
  818. }
  819. }
  820. }
  821. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  822. if let v = self._characteristic {
  823. try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
  824. }
  825. if !self.value.isEmpty {
  826. try visitor.visitSingularBytesField(value: self.value, fieldNumber: 2)
  827. }
  828. if let v = self._failure {
  829. try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
  830. }
  831. try unknownFields.traverse(visitor: &visitor)
  832. }
  833. static func ==(lhs: CharacteristicValueInfo, rhs: CharacteristicValueInfo) -> Bool {
  834. if lhs._characteristic != rhs._characteristic {return false}
  835. if lhs.value != rhs.value {return false}
  836. if lhs._failure != rhs._failure {return false}
  837. if lhs.unknownFields != rhs.unknownFields {return false}
  838. return true
  839. }
  840. }
  841. extension WriteCharacteristicRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  842. static let protoMessageName: String = "WriteCharacteristicRequest"
  843. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  844. 1: .same(proto: "characteristic"),
  845. 2: .same(proto: "value"),
  846. ]
  847. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  848. while let fieldNumber = try decoder.nextFieldNumber() {
  849. // The use of inline closures is to circumvent an issue where the compiler
  850. // allocates stack space for every case branch when no optimizations are
  851. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  852. switch fieldNumber {
  853. case 1: try { try decoder.decodeSingularMessageField(value: &self._characteristic) }()
  854. case 2: try { try decoder.decodeSingularBytesField(value: &self.value) }()
  855. default: break
  856. }
  857. }
  858. }
  859. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  860. if let v = self._characteristic {
  861. try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
  862. }
  863. if !self.value.isEmpty {
  864. try visitor.visitSingularBytesField(value: self.value, fieldNumber: 2)
  865. }
  866. try unknownFields.traverse(visitor: &visitor)
  867. }
  868. static func ==(lhs: WriteCharacteristicRequest, rhs: WriteCharacteristicRequest) -> Bool {
  869. if lhs._characteristic != rhs._characteristic {return false}
  870. if lhs.value != rhs.value {return false}
  871. if lhs.unknownFields != rhs.unknownFields {return false}
  872. return true
  873. }
  874. }
  875. extension WriteCharacteristicInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  876. static let protoMessageName: String = "WriteCharacteristicInfo"
  877. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  878. 1: .same(proto: "characteristic"),
  879. 3: .same(proto: "failure"),
  880. ]
  881. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  882. while let fieldNumber = try decoder.nextFieldNumber() {
  883. // The use of inline closures is to circumvent an issue where the compiler
  884. // allocates stack space for every case branch when no optimizations are
  885. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  886. switch fieldNumber {
  887. case 1: try { try decoder.decodeSingularMessageField(value: &self._characteristic) }()
  888. case 3: try { try decoder.decodeSingularMessageField(value: &self._failure) }()
  889. default: break
  890. }
  891. }
  892. }
  893. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  894. if let v = self._characteristic {
  895. try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
  896. }
  897. if let v = self._failure {
  898. try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
  899. }
  900. try unknownFields.traverse(visitor: &visitor)
  901. }
  902. static func ==(lhs: WriteCharacteristicInfo, rhs: WriteCharacteristicInfo) -> Bool {
  903. if lhs._characteristic != rhs._characteristic {return false}
  904. if lhs._failure != rhs._failure {return false}
  905. if lhs.unknownFields != rhs.unknownFields {return false}
  906. return true
  907. }
  908. }
  909. extension NegotiateMtuRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  910. static let protoMessageName: String = "NegotiateMtuRequest"
  911. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  912. 1: .same(proto: "deviceId"),
  913. 2: .same(proto: "mtuSize"),
  914. ]
  915. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  916. while let fieldNumber = try decoder.nextFieldNumber() {
  917. // The use of inline closures is to circumvent an issue where the compiler
  918. // allocates stack space for every case branch when no optimizations are
  919. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  920. switch fieldNumber {
  921. case 1: try { try decoder.decodeSingularStringField(value: &self.deviceID) }()
  922. case 2: try { try decoder.decodeSingularInt32Field(value: &self.mtuSize) }()
  923. default: break
  924. }
  925. }
  926. }
  927. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  928. if !self.deviceID.isEmpty {
  929. try visitor.visitSingularStringField(value: self.deviceID, fieldNumber: 1)
  930. }
  931. if self.mtuSize != 0 {
  932. try visitor.visitSingularInt32Field(value: self.mtuSize, fieldNumber: 2)
  933. }
  934. try unknownFields.traverse(visitor: &visitor)
  935. }
  936. static func ==(lhs: NegotiateMtuRequest, rhs: NegotiateMtuRequest) -> Bool {
  937. if lhs.deviceID != rhs.deviceID {return false}
  938. if lhs.mtuSize != rhs.mtuSize {return false}
  939. if lhs.unknownFields != rhs.unknownFields {return false}
  940. return true
  941. }
  942. }
  943. extension NegotiateMtuInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  944. static let protoMessageName: String = "NegotiateMtuInfo"
  945. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  946. 1: .same(proto: "deviceId"),
  947. 2: .same(proto: "mtuSize"),
  948. 3: .same(proto: "failure"),
  949. ]
  950. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  951. while let fieldNumber = try decoder.nextFieldNumber() {
  952. // The use of inline closures is to circumvent an issue where the compiler
  953. // allocates stack space for every case branch when no optimizations are
  954. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  955. switch fieldNumber {
  956. case 1: try { try decoder.decodeSingularStringField(value: &self.deviceID) }()
  957. case 2: try { try decoder.decodeSingularInt32Field(value: &self.mtuSize) }()
  958. case 3: try { try decoder.decodeSingularMessageField(value: &self._failure) }()
  959. default: break
  960. }
  961. }
  962. }
  963. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  964. if !self.deviceID.isEmpty {
  965. try visitor.visitSingularStringField(value: self.deviceID, fieldNumber: 1)
  966. }
  967. if self.mtuSize != 0 {
  968. try visitor.visitSingularInt32Field(value: self.mtuSize, fieldNumber: 2)
  969. }
  970. if let v = self._failure {
  971. try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
  972. }
  973. try unknownFields.traverse(visitor: &visitor)
  974. }
  975. static func ==(lhs: NegotiateMtuInfo, rhs: NegotiateMtuInfo) -> Bool {
  976. if lhs.deviceID != rhs.deviceID {return false}
  977. if lhs.mtuSize != rhs.mtuSize {return false}
  978. if lhs._failure != rhs._failure {return false}
  979. if lhs.unknownFields != rhs.unknownFields {return false}
  980. return true
  981. }
  982. }
  983. extension BleStatusInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  984. static let protoMessageName: String = "BleStatusInfo"
  985. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  986. 1: .same(proto: "status"),
  987. ]
  988. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  989. while let fieldNumber = try decoder.nextFieldNumber() {
  990. // The use of inline closures is to circumvent an issue where the compiler
  991. // allocates stack space for every case branch when no optimizations are
  992. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  993. switch fieldNumber {
  994. case 1: try { try decoder.decodeSingularInt32Field(value: &self.status) }()
  995. default: break
  996. }
  997. }
  998. }
  999. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1000. if self.status != 0 {
  1001. try visitor.visitSingularInt32Field(value: self.status, fieldNumber: 1)
  1002. }
  1003. try unknownFields.traverse(visitor: &visitor)
  1004. }
  1005. static func ==(lhs: BleStatusInfo, rhs: BleStatusInfo) -> Bool {
  1006. if lhs.status != rhs.status {return false}
  1007. if lhs.unknownFields != rhs.unknownFields {return false}
  1008. return true
  1009. }
  1010. }
  1011. extension ChangeConnectionPriorityRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1012. static let protoMessageName: String = "ChangeConnectionPriorityRequest"
  1013. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1014. 1: .same(proto: "deviceId"),
  1015. 2: .same(proto: "priority"),
  1016. ]
  1017. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1018. while let fieldNumber = try decoder.nextFieldNumber() {
  1019. // The use of inline closures is to circumvent an issue where the compiler
  1020. // allocates stack space for every case branch when no optimizations are
  1021. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1022. switch fieldNumber {
  1023. case 1: try { try decoder.decodeSingularStringField(value: &self.deviceID) }()
  1024. case 2: try { try decoder.decodeSingularInt32Field(value: &self.priority) }()
  1025. default: break
  1026. }
  1027. }
  1028. }
  1029. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1030. if !self.deviceID.isEmpty {
  1031. try visitor.visitSingularStringField(value: self.deviceID, fieldNumber: 1)
  1032. }
  1033. if self.priority != 0 {
  1034. try visitor.visitSingularInt32Field(value: self.priority, fieldNumber: 2)
  1035. }
  1036. try unknownFields.traverse(visitor: &visitor)
  1037. }
  1038. static func ==(lhs: ChangeConnectionPriorityRequest, rhs: ChangeConnectionPriorityRequest) -> Bool {
  1039. if lhs.deviceID != rhs.deviceID {return false}
  1040. if lhs.priority != rhs.priority {return false}
  1041. if lhs.unknownFields != rhs.unknownFields {return false}
  1042. return true
  1043. }
  1044. }
  1045. extension ChangeConnectionPriorityInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1046. static let protoMessageName: String = "ChangeConnectionPriorityInfo"
  1047. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1048. 1: .same(proto: "deviceId"),
  1049. 2: .same(proto: "failure"),
  1050. ]
  1051. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1052. while let fieldNumber = try decoder.nextFieldNumber() {
  1053. // The use of inline closures is to circumvent an issue where the compiler
  1054. // allocates stack space for every case branch when no optimizations are
  1055. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1056. switch fieldNumber {
  1057. case 1: try { try decoder.decodeSingularStringField(value: &self.deviceID) }()
  1058. case 2: try { try decoder.decodeSingularMessageField(value: &self._failure) }()
  1059. default: break
  1060. }
  1061. }
  1062. }
  1063. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1064. if !self.deviceID.isEmpty {
  1065. try visitor.visitSingularStringField(value: self.deviceID, fieldNumber: 1)
  1066. }
  1067. if let v = self._failure {
  1068. try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
  1069. }
  1070. try unknownFields.traverse(visitor: &visitor)
  1071. }
  1072. static func ==(lhs: ChangeConnectionPriorityInfo, rhs: ChangeConnectionPriorityInfo) -> Bool {
  1073. if lhs.deviceID != rhs.deviceID {return false}
  1074. if lhs._failure != rhs._failure {return false}
  1075. if lhs.unknownFields != rhs.unknownFields {return false}
  1076. return true
  1077. }
  1078. }
  1079. extension CharacteristicAddress: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1080. static let protoMessageName: String = "CharacteristicAddress"
  1081. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1082. 1: .same(proto: "deviceId"),
  1083. 2: .same(proto: "serviceUuid"),
  1084. 3: .same(proto: "characteristicUuid"),
  1085. ]
  1086. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1087. while let fieldNumber = try decoder.nextFieldNumber() {
  1088. // The use of inline closures is to circumvent an issue where the compiler
  1089. // allocates stack space for every case branch when no optimizations are
  1090. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1091. switch fieldNumber {
  1092. case 1: try { try decoder.decodeSingularStringField(value: &self.deviceID) }()
  1093. case 2: try { try decoder.decodeSingularMessageField(value: &self._serviceUuid) }()
  1094. case 3: try { try decoder.decodeSingularMessageField(value: &self._characteristicUuid) }()
  1095. default: break
  1096. }
  1097. }
  1098. }
  1099. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1100. if !self.deviceID.isEmpty {
  1101. try visitor.visitSingularStringField(value: self.deviceID, fieldNumber: 1)
  1102. }
  1103. if let v = self._serviceUuid {
  1104. try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
  1105. }
  1106. if let v = self._characteristicUuid {
  1107. try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
  1108. }
  1109. try unknownFields.traverse(visitor: &visitor)
  1110. }
  1111. static func ==(lhs: CharacteristicAddress, rhs: CharacteristicAddress) -> Bool {
  1112. if lhs.deviceID != rhs.deviceID {return false}
  1113. if lhs._serviceUuid != rhs._serviceUuid {return false}
  1114. if lhs._characteristicUuid != rhs._characteristicUuid {return false}
  1115. if lhs.unknownFields != rhs.unknownFields {return false}
  1116. return true
  1117. }
  1118. }
  1119. extension ServiceDataEntry: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1120. static let protoMessageName: String = "ServiceDataEntry"
  1121. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1122. 1: .same(proto: "serviceUuid"),
  1123. 2: .same(proto: "data"),
  1124. ]
  1125. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1126. while let fieldNumber = try decoder.nextFieldNumber() {
  1127. // The use of inline closures is to circumvent an issue where the compiler
  1128. // allocates stack space for every case branch when no optimizations are
  1129. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1130. switch fieldNumber {
  1131. case 1: try { try decoder.decodeSingularMessageField(value: &self._serviceUuid) }()
  1132. case 2: try { try decoder.decodeSingularBytesField(value: &self.data) }()
  1133. default: break
  1134. }
  1135. }
  1136. }
  1137. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1138. if let v = self._serviceUuid {
  1139. try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
  1140. }
  1141. if !self.data.isEmpty {
  1142. try visitor.visitSingularBytesField(value: self.data, fieldNumber: 2)
  1143. }
  1144. try unknownFields.traverse(visitor: &visitor)
  1145. }
  1146. static func ==(lhs: ServiceDataEntry, rhs: ServiceDataEntry) -> Bool {
  1147. if lhs._serviceUuid != rhs._serviceUuid {return false}
  1148. if lhs.data != rhs.data {return false}
  1149. if lhs.unknownFields != rhs.unknownFields {return false}
  1150. return true
  1151. }
  1152. }
  1153. extension ServicesWithCharacteristics: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1154. static let protoMessageName: String = "ServicesWithCharacteristics"
  1155. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1156. 1: .same(proto: "items"),
  1157. ]
  1158. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1159. while let fieldNumber = try decoder.nextFieldNumber() {
  1160. // The use of inline closures is to circumvent an issue where the compiler
  1161. // allocates stack space for every case branch when no optimizations are
  1162. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1163. switch fieldNumber {
  1164. case 1: try { try decoder.decodeRepeatedMessageField(value: &self.items) }()
  1165. default: break
  1166. }
  1167. }
  1168. }
  1169. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1170. if !self.items.isEmpty {
  1171. try visitor.visitRepeatedMessageField(value: self.items, fieldNumber: 1)
  1172. }
  1173. try unknownFields.traverse(visitor: &visitor)
  1174. }
  1175. static func ==(lhs: ServicesWithCharacteristics, rhs: ServicesWithCharacteristics) -> Bool {
  1176. if lhs.items != rhs.items {return false}
  1177. if lhs.unknownFields != rhs.unknownFields {return false}
  1178. return true
  1179. }
  1180. }
  1181. extension ServiceWithCharacteristics: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1182. static let protoMessageName: String = "ServiceWithCharacteristics"
  1183. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1184. 1: .same(proto: "serviceId"),
  1185. 2: .same(proto: "characteristics"),
  1186. ]
  1187. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1188. while let fieldNumber = try decoder.nextFieldNumber() {
  1189. // The use of inline closures is to circumvent an issue where the compiler
  1190. // allocates stack space for every case branch when no optimizations are
  1191. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1192. switch fieldNumber {
  1193. case 1: try { try decoder.decodeSingularMessageField(value: &self._serviceID) }()
  1194. case 2: try { try decoder.decodeRepeatedMessageField(value: &self.characteristics) }()
  1195. default: break
  1196. }
  1197. }
  1198. }
  1199. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1200. if let v = self._serviceID {
  1201. try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
  1202. }
  1203. if !self.characteristics.isEmpty {
  1204. try visitor.visitRepeatedMessageField(value: self.characteristics, fieldNumber: 2)
  1205. }
  1206. try unknownFields.traverse(visitor: &visitor)
  1207. }
  1208. static func ==(lhs: ServiceWithCharacteristics, rhs: ServiceWithCharacteristics) -> Bool {
  1209. if lhs._serviceID != rhs._serviceID {return false}
  1210. if lhs.characteristics != rhs.characteristics {return false}
  1211. if lhs.unknownFields != rhs.unknownFields {return false}
  1212. return true
  1213. }
  1214. }
  1215. extension DiscoverServicesRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1216. static let protoMessageName: String = "DiscoverServicesRequest"
  1217. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1218. 1: .same(proto: "deviceId"),
  1219. ]
  1220. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1221. while let fieldNumber = try decoder.nextFieldNumber() {
  1222. // The use of inline closures is to circumvent an issue where the compiler
  1223. // allocates stack space for every case branch when no optimizations are
  1224. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1225. switch fieldNumber {
  1226. case 1: try { try decoder.decodeSingularStringField(value: &self.deviceID) }()
  1227. default: break
  1228. }
  1229. }
  1230. }
  1231. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1232. if !self.deviceID.isEmpty {
  1233. try visitor.visitSingularStringField(value: self.deviceID, fieldNumber: 1)
  1234. }
  1235. try unknownFields.traverse(visitor: &visitor)
  1236. }
  1237. static func ==(lhs: DiscoverServicesRequest, rhs: DiscoverServicesRequest) -> Bool {
  1238. if lhs.deviceID != rhs.deviceID {return false}
  1239. if lhs.unknownFields != rhs.unknownFields {return false}
  1240. return true
  1241. }
  1242. }
  1243. extension DiscoverServicesInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1244. static let protoMessageName: String = "DiscoverServicesInfo"
  1245. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1246. 1: .same(proto: "deviceId"),
  1247. 2: .same(proto: "services"),
  1248. ]
  1249. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1250. while let fieldNumber = try decoder.nextFieldNumber() {
  1251. // The use of inline closures is to circumvent an issue where the compiler
  1252. // allocates stack space for every case branch when no optimizations are
  1253. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1254. switch fieldNumber {
  1255. case 1: try { try decoder.decodeSingularStringField(value: &self.deviceID) }()
  1256. case 2: try { try decoder.decodeRepeatedMessageField(value: &self.services) }()
  1257. default: break
  1258. }
  1259. }
  1260. }
  1261. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1262. if !self.deviceID.isEmpty {
  1263. try visitor.visitSingularStringField(value: self.deviceID, fieldNumber: 1)
  1264. }
  1265. if !self.services.isEmpty {
  1266. try visitor.visitRepeatedMessageField(value: self.services, fieldNumber: 2)
  1267. }
  1268. try unknownFields.traverse(visitor: &visitor)
  1269. }
  1270. static func ==(lhs: DiscoverServicesInfo, rhs: DiscoverServicesInfo) -> Bool {
  1271. if lhs.deviceID != rhs.deviceID {return false}
  1272. if lhs.services != rhs.services {return false}
  1273. if lhs.unknownFields != rhs.unknownFields {return false}
  1274. return true
  1275. }
  1276. }
  1277. extension DiscoveredService: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1278. static let protoMessageName: String = "DiscoveredService"
  1279. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1280. 1: .same(proto: "serviceUuid"),
  1281. 2: .same(proto: "characteristicUuids"),
  1282. 3: .same(proto: "includedServices"),
  1283. 4: .same(proto: "characteristics"),
  1284. ]
  1285. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1286. while let fieldNumber = try decoder.nextFieldNumber() {
  1287. // The use of inline closures is to circumvent an issue where the compiler
  1288. // allocates stack space for every case branch when no optimizations are
  1289. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1290. switch fieldNumber {
  1291. case 1: try { try decoder.decodeSingularMessageField(value: &self._serviceUuid) }()
  1292. case 2: try { try decoder.decodeRepeatedMessageField(value: &self.characteristicUuids) }()
  1293. case 3: try { try decoder.decodeRepeatedMessageField(value: &self.includedServices) }()
  1294. case 4: try { try decoder.decodeRepeatedMessageField(value: &self.characteristics) }()
  1295. default: break
  1296. }
  1297. }
  1298. }
  1299. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1300. if let v = self._serviceUuid {
  1301. try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
  1302. }
  1303. if !self.characteristicUuids.isEmpty {
  1304. try visitor.visitRepeatedMessageField(value: self.characteristicUuids, fieldNumber: 2)
  1305. }
  1306. if !self.includedServices.isEmpty {
  1307. try visitor.visitRepeatedMessageField(value: self.includedServices, fieldNumber: 3)
  1308. }
  1309. if !self.characteristics.isEmpty {
  1310. try visitor.visitRepeatedMessageField(value: self.characteristics, fieldNumber: 4)
  1311. }
  1312. try unknownFields.traverse(visitor: &visitor)
  1313. }
  1314. static func ==(lhs: DiscoveredService, rhs: DiscoveredService) -> Bool {
  1315. if lhs._serviceUuid != rhs._serviceUuid {return false}
  1316. if lhs.characteristicUuids != rhs.characteristicUuids {return false}
  1317. if lhs.includedServices != rhs.includedServices {return false}
  1318. if lhs.characteristics != rhs.characteristics {return false}
  1319. if lhs.unknownFields != rhs.unknownFields {return false}
  1320. return true
  1321. }
  1322. }
  1323. extension DiscoveredCharacteristic: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1324. static let protoMessageName: String = "DiscoveredCharacteristic"
  1325. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1326. 1: .same(proto: "characteristicId"),
  1327. 2: .same(proto: "serviceId"),
  1328. 3: .same(proto: "isReadable"),
  1329. 4: .same(proto: "isWritableWithResponse"),
  1330. 5: .same(proto: "isWritableWithoutResponse"),
  1331. 6: .same(proto: "isNotifiable"),
  1332. 7: .same(proto: "isIndicatable"),
  1333. ]
  1334. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1335. while let fieldNumber = try decoder.nextFieldNumber() {
  1336. // The use of inline closures is to circumvent an issue where the compiler
  1337. // allocates stack space for every case branch when no optimizations are
  1338. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1339. switch fieldNumber {
  1340. case 1: try { try decoder.decodeSingularMessageField(value: &self._characteristicID) }()
  1341. case 2: try { try decoder.decodeSingularMessageField(value: &self._serviceID) }()
  1342. case 3: try { try decoder.decodeSingularBoolField(value: &self.isReadable) }()
  1343. case 4: try { try decoder.decodeSingularBoolField(value: &self.isWritableWithResponse) }()
  1344. case 5: try { try decoder.decodeSingularBoolField(value: &self.isWritableWithoutResponse) }()
  1345. case 6: try { try decoder.decodeSingularBoolField(value: &self.isNotifiable) }()
  1346. case 7: try { try decoder.decodeSingularBoolField(value: &self.isIndicatable) }()
  1347. default: break
  1348. }
  1349. }
  1350. }
  1351. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1352. if let v = self._characteristicID {
  1353. try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
  1354. }
  1355. if let v = self._serviceID {
  1356. try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
  1357. }
  1358. if self.isReadable != false {
  1359. try visitor.visitSingularBoolField(value: self.isReadable, fieldNumber: 3)
  1360. }
  1361. if self.isWritableWithResponse != false {
  1362. try visitor.visitSingularBoolField(value: self.isWritableWithResponse, fieldNumber: 4)
  1363. }
  1364. if self.isWritableWithoutResponse != false {
  1365. try visitor.visitSingularBoolField(value: self.isWritableWithoutResponse, fieldNumber: 5)
  1366. }
  1367. if self.isNotifiable != false {
  1368. try visitor.visitSingularBoolField(value: self.isNotifiable, fieldNumber: 6)
  1369. }
  1370. if self.isIndicatable != false {
  1371. try visitor.visitSingularBoolField(value: self.isIndicatable, fieldNumber: 7)
  1372. }
  1373. try unknownFields.traverse(visitor: &visitor)
  1374. }
  1375. static func ==(lhs: DiscoveredCharacteristic, rhs: DiscoveredCharacteristic) -> Bool {
  1376. if lhs._characteristicID != rhs._characteristicID {return false}
  1377. if lhs._serviceID != rhs._serviceID {return false}
  1378. if lhs.isReadable != rhs.isReadable {return false}
  1379. if lhs.isWritableWithResponse != rhs.isWritableWithResponse {return false}
  1380. if lhs.isWritableWithoutResponse != rhs.isWritableWithoutResponse {return false}
  1381. if lhs.isNotifiable != rhs.isNotifiable {return false}
  1382. if lhs.isIndicatable != rhs.isIndicatable {return false}
  1383. if lhs.unknownFields != rhs.unknownFields {return false}
  1384. return true
  1385. }
  1386. }
  1387. extension Uuid: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1388. static let protoMessageName: String = "Uuid"
  1389. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1390. 1: .same(proto: "data"),
  1391. ]
  1392. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1393. while let fieldNumber = try decoder.nextFieldNumber() {
  1394. // The use of inline closures is to circumvent an issue where the compiler
  1395. // allocates stack space for every case branch when no optimizations are
  1396. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1397. switch fieldNumber {
  1398. case 1: try { try decoder.decodeSingularBytesField(value: &self.data) }()
  1399. default: break
  1400. }
  1401. }
  1402. }
  1403. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1404. if !self.data.isEmpty {
  1405. try visitor.visitSingularBytesField(value: self.data, fieldNumber: 1)
  1406. }
  1407. try unknownFields.traverse(visitor: &visitor)
  1408. }
  1409. static func ==(lhs: Uuid, rhs: Uuid) -> Bool {
  1410. if lhs.data != rhs.data {return false}
  1411. if lhs.unknownFields != rhs.unknownFields {return false}
  1412. return true
  1413. }
  1414. }
  1415. extension GenericFailure: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1416. static let protoMessageName: String = "GenericFailure"
  1417. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1418. 1: .same(proto: "code"),
  1419. 2: .same(proto: "message"),
  1420. ]
  1421. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1422. while let fieldNumber = try decoder.nextFieldNumber() {
  1423. // The use of inline closures is to circumvent an issue where the compiler
  1424. // allocates stack space for every case branch when no optimizations are
  1425. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1426. switch fieldNumber {
  1427. case 1: try { try decoder.decodeSingularInt32Field(value: &self.code) }()
  1428. case 2: try { try decoder.decodeSingularStringField(value: &self.message) }()
  1429. default: break
  1430. }
  1431. }
  1432. }
  1433. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1434. if self.code != 0 {
  1435. try visitor.visitSingularInt32Field(value: self.code, fieldNumber: 1)
  1436. }
  1437. if !self.message.isEmpty {
  1438. try visitor.visitSingularStringField(value: self.message, fieldNumber: 2)
  1439. }
  1440. try unknownFields.traverse(visitor: &visitor)
  1441. }
  1442. static func ==(lhs: GenericFailure, rhs: GenericFailure) -> Bool {
  1443. if lhs.code != rhs.code {return false}
  1444. if lhs.message != rhs.message {return false}
  1445. if lhs.unknownFields != rhs.unknownFields {return false}
  1446. return true
  1447. }
  1448. }