@blueid/access-proto 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BlueCore.proto +841 -0
- package/BlueLock.proto +35 -0
- package/BlueSDK.proto +56 -0
- package/BlueSystem.proto +278 -0
- package/es/BlueCore_pb.d.ts +2937 -0
- package/es/BlueCore_pb.js +975 -0
- package/es/BlueLock_pb.d.ts +118 -0
- package/es/BlueLock_pb.js +46 -0
- package/es/BlueSDK_pb.d.ts +197 -0
- package/es/BlueSDK_pb.js +73 -0
- package/es/BlueSystem_pb.d.ts +913 -0
- package/es/BlueSystem_pb.js +272 -0
- package/nanopb/BlueCore.pb.c +188 -0
- package/nanopb/BlueCore.pb.h +1715 -0
- package/nanopb/BlueLock.pb.c +16 -0
- package/nanopb/BlueLock.pb.h +104 -0
- package/nanopb/BlueSDK.pb.c +22 -0
- package/nanopb/BlueSDK.pb.h +159 -0
- package/nanopb/BlueSystem.pb.c +64 -0
- package/nanopb/BlueSystem.pb.h +631 -0
- package/package.json +18 -0
- package/swift/BlueCore.pb.swift +6840 -0
- package/swift/BlueLock.pb.swift +276 -0
- package/swift/BlueSDK.pb.swift +624 -0
- package/swift/BlueSystem.pb.swift +2489 -0
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
// DO NOT EDIT.
|
|
2
|
+
// swift-format-ignore-file
|
|
3
|
+
//
|
|
4
|
+
// Generated by the Swift generator plugin for the protocol buffer compiler.
|
|
5
|
+
// Source: BlueLock.proto
|
|
6
|
+
//
|
|
7
|
+
// For information on using the generated types, please see the documentation:
|
|
8
|
+
// https://github.com/apple/swift-protobuf/
|
|
9
|
+
|
|
10
|
+
import Foundation
|
|
11
|
+
import SwiftProtobuf
|
|
12
|
+
|
|
13
|
+
// If the compiler emits an error on this type, it is because this file
|
|
14
|
+
// was generated by a version of the `protoc` Swift plug-in that is
|
|
15
|
+
// incompatible with the version of SwiftProtobuf to which you are linking.
|
|
16
|
+
// Please ensure that you are building against the same version of the API
|
|
17
|
+
// that was used to generate this file.
|
|
18
|
+
fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
|
|
19
|
+
struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
|
|
20
|
+
typealias Version = _2
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
public enum BlueLockState: SwiftProtobuf.Enum {
|
|
24
|
+
public typealias RawValue = Int
|
|
25
|
+
case unknownLockState // = 1
|
|
26
|
+
case locked // = 2
|
|
27
|
+
case unlocked // = 3
|
|
28
|
+
case jammed // = 4
|
|
29
|
+
|
|
30
|
+
public init() {
|
|
31
|
+
self = .unknownLockState
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
public init?(rawValue: Int) {
|
|
35
|
+
switch rawValue {
|
|
36
|
+
case 1: self = .unknownLockState
|
|
37
|
+
case 2: self = .locked
|
|
38
|
+
case 3: self = .unlocked
|
|
39
|
+
case 4: self = .jammed
|
|
40
|
+
default: return nil
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
public var rawValue: Int {
|
|
45
|
+
switch self {
|
|
46
|
+
case .unknownLockState: return 1
|
|
47
|
+
case .locked: return 2
|
|
48
|
+
case .unlocked: return 3
|
|
49
|
+
case .jammed: return 4
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
#if swift(>=4.2)
|
|
56
|
+
|
|
57
|
+
extension BlueLockState: CaseIterable {
|
|
58
|
+
// Support synthesized by the compiler.
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
#endif // swift(>=4.2)
|
|
62
|
+
|
|
63
|
+
public struct BlueLockConfig {
|
|
64
|
+
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
|
65
|
+
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
|
66
|
+
// methods supported on all messages.
|
|
67
|
+
|
|
68
|
+
/// Schedules for when the lock opens automatically
|
|
69
|
+
public var openSchedules: [BlueLocalTimeSchedule] = []
|
|
70
|
+
|
|
71
|
+
/// If set to true then the lock opens by schedule only after it was first
|
|
72
|
+
/// opened by an authenticated user and is within any of the open schedules
|
|
73
|
+
public var openScheduleByUser: Bool {
|
|
74
|
+
get {return _openScheduleByUser ?? false}
|
|
75
|
+
set {_openScheduleByUser = newValue}
|
|
76
|
+
}
|
|
77
|
+
/// Returns true if `openScheduleByUser` has been explicitly set.
|
|
78
|
+
public var hasOpenScheduleByUser: Bool {return self._openScheduleByUser != nil}
|
|
79
|
+
/// Clears the value of `openScheduleByUser`. Subsequent reads from it will return its default value.
|
|
80
|
+
public mutating func clearOpenScheduleByUser() {self._openScheduleByUser = nil}
|
|
81
|
+
|
|
82
|
+
/// Days of year (1-366) the open schedule is ignored (ie vacation days)
|
|
83
|
+
public var closedDays: [UInt32] = []
|
|
84
|
+
|
|
85
|
+
/// Default time in seconds to keep the lock open
|
|
86
|
+
public var defaultOpenTimeSec: UInt32 {
|
|
87
|
+
get {return _defaultOpenTimeSec ?? 5}
|
|
88
|
+
set {_defaultOpenTimeSec = newValue}
|
|
89
|
+
}
|
|
90
|
+
/// Returns true if `defaultOpenTimeSec` has been explicitly set.
|
|
91
|
+
public var hasDefaultOpenTimeSec: Bool {return self._defaultOpenTimeSec != nil}
|
|
92
|
+
/// Clears the value of `defaultOpenTimeSec`. Subsequent reads from it will return its default value.
|
|
93
|
+
public mutating func clearDefaultOpenTimeSec() {self._defaultOpenTimeSec = nil}
|
|
94
|
+
|
|
95
|
+
/// Extended time in seconds to keep the lock open
|
|
96
|
+
public var extendedOpenTimeSec: UInt32 {
|
|
97
|
+
get {return _extendedOpenTimeSec ?? 3600}
|
|
98
|
+
set {_extendedOpenTimeSec = newValue}
|
|
99
|
+
}
|
|
100
|
+
/// Returns true if `extendedOpenTimeSec` has been explicitly set.
|
|
101
|
+
public var hasExtendedOpenTimeSec: Bool {return self._extendedOpenTimeSec != nil}
|
|
102
|
+
/// Clears the value of `extendedOpenTimeSec`. Subsequent reads from it will return its default value.
|
|
103
|
+
public mutating func clearExtendedOpenTimeSec() {self._extendedOpenTimeSec = nil}
|
|
104
|
+
|
|
105
|
+
public var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
106
|
+
|
|
107
|
+
public init() {}
|
|
108
|
+
|
|
109
|
+
fileprivate var _openScheduleByUser: Bool? = nil
|
|
110
|
+
fileprivate var _defaultOpenTimeSec: UInt32? = nil
|
|
111
|
+
fileprivate var _extendedOpenTimeSec: UInt32? = nil
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
public struct BlueLockStatus {
|
|
115
|
+
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
|
116
|
+
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
|
117
|
+
// methods supported on all messages.
|
|
118
|
+
|
|
119
|
+
public var state: BlueLockState {
|
|
120
|
+
get {return _state ?? .unknownLockState}
|
|
121
|
+
set {_state = newValue}
|
|
122
|
+
}
|
|
123
|
+
/// Returns true if `state` has been explicitly set.
|
|
124
|
+
public var hasState: Bool {return self._state != nil}
|
|
125
|
+
/// Clears the value of `state`. Subsequent reads from it will return its default value.
|
|
126
|
+
public mutating func clearState() {self._state = nil}
|
|
127
|
+
|
|
128
|
+
public var openings: UInt32 {
|
|
129
|
+
get {return _openings ?? 0}
|
|
130
|
+
set {_openings = newValue}
|
|
131
|
+
}
|
|
132
|
+
/// Returns true if `openings` has been explicitly set.
|
|
133
|
+
public var hasOpenings: Bool {return self._openings != nil}
|
|
134
|
+
/// Clears the value of `openings`. Subsequent reads from it will return its default value.
|
|
135
|
+
public mutating func clearOpenings() {self._openings = nil}
|
|
136
|
+
|
|
137
|
+
public var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
138
|
+
|
|
139
|
+
public init() {}
|
|
140
|
+
|
|
141
|
+
fileprivate var _state: BlueLockState? = nil
|
|
142
|
+
fileprivate var _openings: UInt32? = nil
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
#if swift(>=5.5) && canImport(_Concurrency)
|
|
146
|
+
extension BlueLockState: @unchecked Sendable {}
|
|
147
|
+
extension BlueLockConfig: @unchecked Sendable {}
|
|
148
|
+
extension BlueLockStatus: @unchecked Sendable {}
|
|
149
|
+
#endif // swift(>=5.5) && canImport(_Concurrency)
|
|
150
|
+
|
|
151
|
+
// MARK: - Code below here is support for the SwiftProtobuf runtime.
|
|
152
|
+
|
|
153
|
+
extension BlueLockState: SwiftProtobuf._ProtoNameProviding {
|
|
154
|
+
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
|
155
|
+
1: .same(proto: "UnknownLockState"),
|
|
156
|
+
2: .same(proto: "Locked"),
|
|
157
|
+
3: .same(proto: "Unlocked"),
|
|
158
|
+
4: .same(proto: "Jammed"),
|
|
159
|
+
]
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
extension BlueLockConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
163
|
+
public static let protoMessageName: String = "BlueLockConfig"
|
|
164
|
+
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
|
165
|
+
1: .same(proto: "openSchedules"),
|
|
166
|
+
2: .same(proto: "openScheduleByUser"),
|
|
167
|
+
20: .same(proto: "closedDays"),
|
|
168
|
+
21: .same(proto: "defaultOpenTimeSec"),
|
|
169
|
+
22: .same(proto: "extendedOpenTimeSec"),
|
|
170
|
+
]
|
|
171
|
+
|
|
172
|
+
public var isInitialized: Bool {
|
|
173
|
+
if self._openScheduleByUser == nil {return false}
|
|
174
|
+
if self._defaultOpenTimeSec == nil {return false}
|
|
175
|
+
if self._extendedOpenTimeSec == nil {return false}
|
|
176
|
+
if !SwiftProtobuf.Internal.areAllInitialized(self.openSchedules) {return false}
|
|
177
|
+
return true
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
|
181
|
+
while let fieldNumber = try decoder.nextFieldNumber() {
|
|
182
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
183
|
+
// allocates stack space for every case branch when no optimizations are
|
|
184
|
+
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
|
185
|
+
switch fieldNumber {
|
|
186
|
+
case 1: try { try decoder.decodeRepeatedMessageField(value: &self.openSchedules) }()
|
|
187
|
+
case 2: try { try decoder.decodeSingularBoolField(value: &self._openScheduleByUser) }()
|
|
188
|
+
case 20: try { try decoder.decodeRepeatedUInt32Field(value: &self.closedDays) }()
|
|
189
|
+
case 21: try { try decoder.decodeSingularUInt32Field(value: &self._defaultOpenTimeSec) }()
|
|
190
|
+
case 22: try { try decoder.decodeSingularUInt32Field(value: &self._extendedOpenTimeSec) }()
|
|
191
|
+
default: break
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
197
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
198
|
+
// allocates stack space for every if/case branch local when no optimizations
|
|
199
|
+
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
|
|
200
|
+
// https://github.com/apple/swift-protobuf/issues/1182
|
|
201
|
+
if !self.openSchedules.isEmpty {
|
|
202
|
+
try visitor.visitRepeatedMessageField(value: self.openSchedules, fieldNumber: 1)
|
|
203
|
+
}
|
|
204
|
+
try { if let v = self._openScheduleByUser {
|
|
205
|
+
try visitor.visitSingularBoolField(value: v, fieldNumber: 2)
|
|
206
|
+
} }()
|
|
207
|
+
if !self.closedDays.isEmpty {
|
|
208
|
+
try visitor.visitRepeatedUInt32Field(value: self.closedDays, fieldNumber: 20)
|
|
209
|
+
}
|
|
210
|
+
try { if let v = self._defaultOpenTimeSec {
|
|
211
|
+
try visitor.visitSingularUInt32Field(value: v, fieldNumber: 21)
|
|
212
|
+
} }()
|
|
213
|
+
try { if let v = self._extendedOpenTimeSec {
|
|
214
|
+
try visitor.visitSingularUInt32Field(value: v, fieldNumber: 22)
|
|
215
|
+
} }()
|
|
216
|
+
try unknownFields.traverse(visitor: &visitor)
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
public static func ==(lhs: BlueLockConfig, rhs: BlueLockConfig) -> Bool {
|
|
220
|
+
if lhs.openSchedules != rhs.openSchedules {return false}
|
|
221
|
+
if lhs._openScheduleByUser != rhs._openScheduleByUser {return false}
|
|
222
|
+
if lhs.closedDays != rhs.closedDays {return false}
|
|
223
|
+
if lhs._defaultOpenTimeSec != rhs._defaultOpenTimeSec {return false}
|
|
224
|
+
if lhs._extendedOpenTimeSec != rhs._extendedOpenTimeSec {return false}
|
|
225
|
+
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
226
|
+
return true
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
extension BlueLockStatus: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
231
|
+
public static let protoMessageName: String = "BlueLockStatus"
|
|
232
|
+
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
|
233
|
+
1: .same(proto: "state"),
|
|
234
|
+
2: .same(proto: "openings"),
|
|
235
|
+
]
|
|
236
|
+
|
|
237
|
+
public var isInitialized: Bool {
|
|
238
|
+
if self._state == nil {return false}
|
|
239
|
+
if self._openings == nil {return false}
|
|
240
|
+
return true
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
|
244
|
+
while let fieldNumber = try decoder.nextFieldNumber() {
|
|
245
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
246
|
+
// allocates stack space for every case branch when no optimizations are
|
|
247
|
+
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
|
248
|
+
switch fieldNumber {
|
|
249
|
+
case 1: try { try decoder.decodeSingularEnumField(value: &self._state) }()
|
|
250
|
+
case 2: try { try decoder.decodeSingularUInt32Field(value: &self._openings) }()
|
|
251
|
+
default: break
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
257
|
+
// The use of inline closures is to circumvent an issue where the compiler
|
|
258
|
+
// allocates stack space for every if/case branch local when no optimizations
|
|
259
|
+
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
|
|
260
|
+
// https://github.com/apple/swift-protobuf/issues/1182
|
|
261
|
+
try { if let v = self._state {
|
|
262
|
+
try visitor.visitSingularEnumField(value: v, fieldNumber: 1)
|
|
263
|
+
} }()
|
|
264
|
+
try { if let v = self._openings {
|
|
265
|
+
try visitor.visitSingularUInt32Field(value: v, fieldNumber: 2)
|
|
266
|
+
} }()
|
|
267
|
+
try unknownFields.traverse(visitor: &visitor)
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
public static func ==(lhs: BlueLockStatus, rhs: BlueLockStatus) -> Bool {
|
|
271
|
+
if lhs._state != rhs._state {return false}
|
|
272
|
+
if lhs._openings != rhs._openings {return false}
|
|
273
|
+
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
274
|
+
return true
|
|
275
|
+
}
|
|
276
|
+
}
|