  */
 public struct GAPUnprovisionedDeviceBeacon {
     
-    public static let minLength = 19
-    
-    public static let maxLength = 23
-    
-    public let beaconType: GAPBeaconType
-    
+    /// Unprovisioned Device beacon type (0x00).
+    public static let beaconType: GAPBeaconType = .unprovisionedDevice
+    
+    /// Device UUID uniquely identifying this device.
     public let deviceUUID: UUID
     
+    /// OOB Information
     public let oobInformationFlags: BitMaskOptionSet<GAPOOBInformationFlag>
     
+    /// Hash of the associated URI advertised with the URI AD Type (optional field).
     public let uriHash: UInt32?
     
-    public init(beaconType: GAPBeaconType,
-                deviceUUID: UUID,
-                oobInformationFlags: BitMaskOptionSet<GAPOOBInformationFlag>, uriHash: UInt32? = nil) {
-        
-        self.beaconType = beaconType
+    public init(deviceUUID: UUID,
+                oobInformationFlags: BitMaskOptionSet<GAPOOBInformationFlag>,
+                uriHash: UInt32? = nil) {
+        
         self.deviceUUID = deviceUUID
         self.oobInformationFlags = oobInformationFlags
         self.uriHash = uriHash

        
        switch self {
            
        case .unprovisionedDevice(let beacon):
            
            return Data([GAPBeaconType.unprovisionedDevice.rawValue]) + beacon.data
            
        case .secureNetwork(let beacon):
            
            return Data([GAPBeaconType.secureNetwork.rawValue]) + beacon.data
            
        }
        
    }
    
}

/**

    
    public init?(data: Data) {
        
        guard let length = Length(rawValue: data.count)
            else { return nil }
        
        guard let beaconType = GAPBeaconType(rawValue: data[0]),
            beaconType == type(of: self).beaconType
            else { return nil }
        
        let deviceUUID = UUID(UInt128(littleEndian: UInt128(bytes: (data[1], data[2], data[3], data[4], data[5], data[6], data[7], data[8], data[9], data[10], data[11], data[12], data[13], data[14], data[15], data[16]))))
        
        let oobInformationFlags = BitMaskOptionSet<GAPOOBInformationFlag>(rawValue: UInt16(littleEndian: UInt16(bytes: (data[17], data[18]))))
        
        let uriHash: UInt32?
        
        switch length {
            
        case .withoutURI:
            
            uriHash = nil
            
        case .withURI:
            
            uriHash = UInt32(littleEndian: UInt32(bytes: (data[19], data[20], data[21], data[22])))
        }
        
        self.init(deviceUUID: deviceUUID, oobInformationFlags: oobInformationFlags, uriHash: uriHash)
    }
    
    var data: Data {
        
        var data = Data()
        
        data.append(type(of: self).beaconType.rawValue)
        
        data.append(UInt128(uuid: deviceUUID).littleEndian.data)
        
