ProfileDevice
public struct ProfileDevice : Device
Struct representing a Profile device.
-
The ID of the device.
Declaration
Swift
public let id: String
-
The name of the device.
Declaration
Swift
public var deviceName: String
-
The URL suffix for the device.
Declaration
Swift
public let urlSuffix: String
-
The identifier of the device.
Declaration
Swift
public let identifier: String
-
The metadata of the device.
Declaration
Swift
public let metadata: [String : Any]
-
The location of the device.
Declaration
Swift
public let location: Location?
-
The last selected date of the device.
Declaration
Swift
public let lastSelectedDate: TimeInterval
-
Creates a new instance by decoding from the given decoder. This initializer throws an error if reading from the decoder fails, or if the data read is corrupted or otherwise invalid.
Declaration
Swift
public init(from decoder: any Decoder) throws
Parameters
decoder
The decoder to read data from.
-
Encodes this value into the given encoder. If the value fails to encode anything,
encoder
will encode an empty keyed container in its place. This function throws an error if any values are invalid for the given encoder’s format.Declaration
Swift
public func encode(to encoder: Encoder) throws
Parameters
encoder
The encoder to write data to.