RSDTaskGroupObject
public struct RSDTaskGroupObject : RSDTaskGroup, RSDEmbeddedIconVendor, Decodable
RSDTaskGroupObject
is a concrete implementation of the RSDTaskGroup
protocol.
-
A short string that uniquely identifies the task group.
Declaration
Swift
public let identifier: String
-
The primary text to display for the task group in a localized string.
Declaration
Swift
public var title: String?
-
Additional detail text to display for the task group in a localized string.
Declaration
Swift
public var detail: String?
-
The optional
RSDImageWrapper
with the pointer to the image.Declaration
Swift
public var icon: RSDImageWrapper?
-
A list of the task references included in this group.
Declaration
Swift
public let tasks: [RSDTaskInfo]
-
Default initializer.
Declaration
Swift
public init(with identifier: String, tasks: [RSDTaskInfo])
Parameters
identifier
A short string that uniquely identifies the task group.
tasks
A list of the task references included in this group.
-
Initialize from a
Decoder
. This decoding method will use theRSDFactory
instance associated with the decoder to decode thetasks
.example:
let json = """ { "identifier": "foobar", "title": "Foobarific", "detail": "This is a task group containing foo and bar", "icon": "foobarIcon", "tasks" : [{ "identifier": "foo", "schemaRevision" : 2, "title": "Hello Foo!", "detail": "This is a test of foo.", "copyright": "This is a copyright string for foo.", "estimatedMinutes": 5, "icon": "fooIcon", "taskTransformer" : { "resourceName": "TaskFoo", "bundleIdentifier": "org.example.SharedResources" } }, { "identifier": "bar", "schemaRevision" : 4, "title": "Hello Bar!", "detail": "This is a test of bar.", "estimatedMinutes": 7, "icon": "barIcon" }] } """.data(using: .utf8)! // our data in native (JSON) format
Throws
DecodingError
Declaration
Swift
public init(from decoder: Decoder) throws
Parameters
decoder
The decoder to use to decode this instance.