Structures
The following structures are available globally.
-
See moreCodingKey
for converting a decoding container to a dictionary where any key in the dictionary is accessible.Declaration
Swift
public struct AnyCodingKey : CodingKey
-
Wrapper for any codable array.
See moreDeclaration
Swift
public struct AnyCodableArray : Codable
-
Wrapper for any codable dictionary.
See moreDeclaration
Swift
public struct AnyCodableDictionary : Codable
-
RSDActiveUIStepCommand
is anOptionSet
for certain commonly used commands that are used at the beginning and end of an active step.Seealso
RSDActiveUIStep
Declaration
Swift
public struct RSDActiveUIStepCommand : RSDStringLiteralOptionSet
-
See moreRSDAnswerResultObject
is a concrete implementation of a result that can be described using a single value.Declaration
Swift
public struct RSDAnswerResultObject : RSDAnswerResult, Codable
-
See moreRSDAnswerResultType
is aCodable
struct that can be used to describe how to encode and decode anRSDAnswerResult
. It carries information about the type of the value and how to encode it. This struct serves a different purpose from theRSDFormDataType
because it only carries information required to store a result and not additional information about presentation style.Declaration
Swift
public struct RSDAnswerResultType : Codable, Hashable, Equatable
-
The type of the async action configuration. This is used to decode async action configurations using an instance of
RSDFactory
.Seealso
RSDAsyncActionConfiguration
Declaration
Swift
public struct RSDAsyncActionType : RSDFactoryTypeRepresentable, Codable, Hashable
-
See moreRSDChoiceObject
is a concrete implementation ofRSDChoice
that can be used to track a multiple choice, single choice, or multiple component input field where each choice in the input field maps to a specific value.Declaration
Swift
public struct RSDChoiceObject<T> : RSDChoice, RSDComparable, RSDEmbeddedIconVendor, Codable where T : Decodable, T : Encodable
-
A simple struct that can be used to implement the
See moreRSDChoiceOptions
protocol.Declaration
Swift
public struct RSDChoiceOptionsObject : RSDChoiceOptions
-
Concrete implementation of the
See moreRSDCohortNavigationRule
.Declaration
Swift
public struct RSDCohortNavigationRuleObject : RSDCohortNavigationRule, Codable
-
See moreRSDCollectionResultObject
is used include multiple results associated with a single step or async action that may have more that one result.Declaration
Swift
public struct RSDCollectionResultObject : RSDCollectionResult, RSDNavigationResult, Codable, RSDCopyWithIdentifier
-
RSDColorPlacementThemeElementObject
tells the UI what the background color and foreground color are for a given view as well as whether or not the foreground elements should uselight style
.The mapping is handled using a dictionary of color placements to the color style for that placement.
See moreDeclaration
Swift
public struct RSDColorPlacementThemeElementObject : RSDColorMappingThemeElement, RSDDecodableBundleInfo
-
RSDSingleColorThemeElementObject
tells the UI what the background color and foreground color are for a given view as well as whether or not the foreground elements should uselight style
.The mapping is handled using a single style for the entire view.
See moreDeclaration
Swift
public struct RSDSingleColorThemeElementObject : RSDColorMappingThemeElement, RSDDecodableBundleInfo
-
The type of the color mapping theme element. This is used to decode a
See moreRSDColorMappingThemeElement
using aRSDFactory
. It can also be used to customize the UI.Declaration
Swift
public struct RSDColorMappingThemeElementType : RSDFactoryTypeRepresentable, Codable, Equatable, Hashable
-
A color library is a versioned collection of color swatches.
See moreDeclaration
Swift
public struct RSDColorLibrary : Codable, Equatable, Hashable, Comparable
-
The color palette struct is used to describe the color palette for a given application. This is intended for applications that use the Sage Design System.
See moreDeclaration
Swift
public struct RSDColorPalette : Codable, Equatable, Hashable
-
The color key is a model object that contains the information needed by the color design system to describe the colors associated with a given set of components.
See moreDeclaration
Swift
public struct RSDColorKey : Codable, Equatable, Hashable, RSDColorMapping
-
A color swatch refers to a series of color tiles within the same family.
See moreDeclaration
Swift
public struct RSDColorSwatch : Codable, Equatable, Hashable, RSDColorFamily
-
A special-case color swatch for gray scale components.
See moreDeclaration
Swift
public struct RSDGrayScale : Codable, Equatable, Hashable, RSDColorFamily
-
A color tile is a single color and whether or not that color uses light style.
See moreDeclaration
Swift
public struct RSDColorTile : Codable, Equatable, Hashable
-
See moreRSDComparableSurveyRuleObject
is a survey rule that matches an expected result to the answer and vends a skip identifier if the match is evaluated totrue
.Declaration
Swift
public struct RSDComparableSurveyRuleObject<T> : RSDComparableSurveyRule, Codable where T : Decodable, T : Encodable
-
See moreRSDConditionalStepNavigatorObject
is a concrete implementation of theRSDConditionalStepNavigator
protocol.Declaration
Swift
public struct RSDConditionalStepNavigatorObject : RSDConditionalStepNavigator, RSDCopyStepNavigator, Decodable
-
RSDDateCoderObject
provides a concrete implementation of aRSDDateCoder
. The date coder is used by theRSDDateRangeObject
to encode and decode theminDate
andmaxDate
properties as well as to get which components of a date should be stored in the answer for a givenRSDInputField
.This coder uses ISO 8601 format to determine which calendar components to request from the user and to store from the input result. The
See morecalendar
is ISO8601 and theresultFormatter
is determined from thecalendarComponents
using the sharedRSDFactory
or the factory associated with the decoder if instantiated using aDecoder
. The locale for the date formatters isen_US_POSIX
by default.Declaration
Swift
public struct RSDDateCoderObject : RSDDateCoder, RawRepresentable
-
A simple struct that can be used to implement the
See moreRSDDatePickerDataSource
protocol.Declaration
Swift
public struct RSDDatePickerDataSourceObject : RSDDatePickerDataSource
-
See moreRSDDateRangeObject
is a concrete implementation of aRSDDateRange
that defines the range of values appropriate for adate
data type.Declaration
Swift
public struct RSDDateRangeObject : RSDDateRange, Codable
-
RSDDeviceType
describes various devices. It can be used by a task to vend different steps or async actions based upon what is supported by a given device type.Note
This is not currently used and may be deprecated.Declaration
Swift
public struct RSDDeviceType : RSDFactoryTypeRepresentable, Codable, Hashable
-
The default configuration to use for a
RSDDistanceRecorder
.- example:
See more// Example json for a codable configuration. let json = """ { "identifier": "foo", "type": "distance", "motionStepIdentifier": "run" "startStepIdentifier": "countdown", "stopStepIdentifier": "rest", } """.data(using: .utf8)! // our data in native (JSON) format
Declaration
Swift
@available(iOS 10.0, *) public struct RSDDistanceRecorderConfiguration : RSDRecorderConfiguration, Codable
-
See moreRSDDurationPickerDataSourceObject
is a concrete implementation of aRSDMultipleComponentChoiceOptions
that can be used to select a duration using duration units for each component of the duration.Declaration
Swift
public struct RSDDurationPickerDataSourceObject : RSDMultipleComponentPickerDataSource
-
See moreRSDDurationRangeObject
extends the properties of anRSDInputField
for a.duration
data type.Declaration
Swift
public struct RSDDurationRangeObject : RSDDurationRange, RSDRangeWithFormatter, Codable
-
See moreRSDErrorResult
is a result that holds information about an error.Declaration
Swift
public struct RSDErrorResultObject : RSDErrorResult, Codable
-
A manifest for a given file that includes the filename, content type, and creation timestamp.
See moreDeclaration
Swift
public struct RSDFileManifest : Codable, Hashable, Equatable
-
See moreRSDFileResultObject
is a concrete implementation of a result that holds a pointer to a file url.Declaration
Swift
public struct RSDFileResultObject : RSDFileResult, Codable
-
The
See moreRSDFormUIHint
enum is a key word that can be used to describe the preferred UI for a form input field. This is intended as ahint
that the designers and developers can use to indicate the preferred input style for an input field. Not all ui hints are applicable to all data types or devices, and therefore the ui hint may be ignored by the application displaying the input field to the user.Declaration
Swift
public struct RSDFormUIHint : RawRepresentable, Codable, Hashable
-
RSDGenericStepObject
is a step with key/value pairs decoded from a dictionary. This is the default step returned byRSDFactory
for an unrecoginized type.This step is intended for use as a placeholder step for decoding a step that may be defined using a customized subtype or for replacing properties on an
See moreRSDMutableStep
.Declaration
Swift
public struct RSDGenericStepObject : RSDGenericStep, Decodable
-
The icon info is a simple image holder that also contains a title and subtitle for the image.
See moreDeclaration
Swift
public struct RSDIconInfo : Codable
-
See moreRSDIdentifier
is intended to allow a developer to define constants for the identifiers that are used to define the tasks, steps, input fields, and async actions associated with a given task or task group.Declaration
Swift
public struct RSDIdentifier : RawRepresentable, Codable, Hashable
-
A concrete implementation for a
See moreRSDImagePickerStep
.Declaration
Swift
public struct RSDImagePickerStepObject : RSDImagePickerStep, Codable
-
A hint as to where the UI should place an image.
See moreDeclaration
Swift
public struct RSDImagePlacementType : RawRepresentable, Codable, Hashable, Equatable
-
The type of the image theme. This is used to decode a
See moreRSDImageThemeElement
using aRSDFactory
. It can also be used to customize the UI.Declaration
Swift
public struct RSDImageThemeElementType : RSDFactoryTypeRepresentable, Codable, Equatable, Hashable
-
See moreRSDImageWrapper
vends an image. It does not handle image caching. If your app using a custom image caching, then you will need to use the shared delegate to implement this. The image wrapper is designed to allow coding of images using animageName
property as a key for accessing the image.Declaration
Swift
public struct RSDImageWrapper
-
See moreRSDFetchableImageThemeElementObject
is aCodable
concrete implementation ofRSDFetchableImageThemeElement
.Declaration
Swift
public struct RSDFetchableImageThemeElementObject : RSDFetchableImageThemeElement, RSDDecodableBundleInfo, Codable
-
See moreRSDAnimatedImageThemeElementObject
is aCodable
concrete implementation ofRSDAnimatedImageThemeElement
.Declaration
Swift
public struct RSDAnimatedImageThemeElementObject : RSDAnimatedImageThemeElement, RSDDecodableBundleInfo, Codable
-
The default configuration to use for a
RSDMotionRecorder
.- example:
See more// Example json for a codable configuration. let json = """ { "identifier": "foo", "type": "motion", "startStepIdentifier": "start", "stopStepIdentifier": "stop", "requiresBackgroundAudio": true, "recorderTypes": ["accelerometer", "gyro", "magnetometer"], "frequency": 50 } """.data(using: .utf8)! // our data in native (JSON) format
Declaration
Swift
@available(iOS 10.0, *) public struct RSDMotionRecorderConfiguration : RSDRestartableRecorderConfiguration, Codable
-
A simple struct that can be used to implement the
See moreRSDMultipleComponentOptions
protocol.Declaration
Swift
public struct RSDMultipleComponentOptionsObject : RSDMultipleComponentOptions
-
A simple struct that can be used to implement the
See moreRSDNumberPickerDataSource
protocol.Declaration
Swift
public struct RSDNumberPickerDataSourceObject : RSDNumberPickerDataSource
-
See moreRSDNumberRangeObject
extends the properties of anRSDInputField
for adecimal
orinteger
data type.Declaration
Swift
public struct RSDNumberRangeObject : RSDNumberRange, RSDRangeWithFormatter, Codable
-
The
See moreRSDRegExValidatorObject
is a concrete implementation of theRSDCodableRegExMatchValidator
that can be used to create a regex validation of an input string using a regex pattern.Declaration
Swift
public struct RSDRegExValidatorObject : RSDCodableRegExMatchValidator
-
See moreRSDResourceType
is an extendable struct for describing the type of a resource. By default, these values will map to the file extension.Declaration
Swift
public struct RSDResourceType : RawRepresentable, Equatable, Hashable, Codable
-
See moreRSDResultObject
is a concrete implementation of the base result associated with a task, step, or asynchronous action.Declaration
Swift
public struct RSDResultObject : RSDNavigationResult, Codable
-
See moreRSDResultType
is an extendable string enum used byRSDFactory
to create the appropriate result type.Declaration
Swift
public struct RSDResultType : RSDFactoryTypeRepresentable, Codable, Hashable
-
See moreRSDRecordMarker
is a concrete implementation ofRSDSampleRecord
that can be used to mark the step transitions for a recording.Declaration
Swift
public struct RSDRecordMarker : RSDSampleRecord
-
Implementation of the
See moreRSDStringSeparatedEncodingFormat
protocol that wraps a comma separated encodable.Declaration
Swift
public struct CSVEncodingFormat<K> : RSDStringSeparatedEncodingFormat where K : RSDDelimiterSeparatedEncodable
-
See moreRSDSchemaInfoObject
is a concrete implementation of theRSDSchemaInfo
protocol.Declaration
Swift
public struct RSDSchemaInfoObject : RSDSchemaInfo, Codable, Hashable
-
Default implementation for building a task scoring.
See moreDeclaration
Swift
public struct RSDDefaultScoreBuilder : RSDScoreBuilder
-
See moreRSDSectionStepObject
is used to define a logical subgrouping of steps such as a section in a longer survey or an active step that includes an instruction step, countdown step, and activity step.Declaration
Swift
public struct RSDSectionStepObject : RSDSectionStep, RSDConditionalStepNavigator, RSDStepValidator, RSDCopyStep, Decodable
-
See moreRSDStandardAsyncActionConfiguration
is a concrete implementation ofRSDRecorderConfiguration
that can be used to decode an async configuration for a recorder.Declaration
Swift
public struct RSDStandardAsyncActionConfiguration : RSDRecorderConfiguration, Codable
-
The type of the step. This is used to decode the step using a
See moreRSDFactory
. It can also be used to customize the UI.Declaration
Swift
public struct RSDStepNavigatorType : RSDFactoryTypeRepresentable, Codable, Hashable
-
See moreRSDStepTransformerObject
is used in decoding a step with replacement properties for some or all of the steps in a section that is defined using a different resource. The factory will convert this step into an appropriateRSDSectionStep
from the decoded object.Declaration
Swift
public struct RSDStepTransformerObject : RSDStepTransformer, Decodable
-
The type of the step. This is used to decode the step using a
See moreRSDFactory
. It can also be used to customize the UI.Declaration
Swift
public struct RSDStepType : RSDFactoryTypeRepresentable, Codable, Hashable
-
See moreRSDTaskGroupObject
is a concrete implementation of theRSDTaskGroup
protocol.Declaration
Swift
public struct RSDTaskGroupObject : RSDTaskGroup, RSDEmbeddedIconVendor, Decodable
-
See moreRSDTaskInfoStepObject
is a concrete implementation of theRSDTaskInfoStep
protocol.Declaration
Swift
public struct RSDTaskInfoStepObject : RSDTaskInfoStep
-
The metadata for a task result archive that can be zipped using the app developer’s choice of third-party archival tools.
See moreDeclaration
Swift
public struct RSDTaskMetadata : Codable
-
See moreRSDTaskResultObject
is a result associated with a task. This object includes a step history, task run UUID, schema identifier, and asynchronous results.Declaration
Swift
public struct RSDTaskResultObject : RSDTaskRunResult, Codable
-
See moreRSDTextFieldOptionsObject
defines the options for a text field.Declaration
Swift
public struct RSDTextFieldOptionsObject : RSDTextFieldOptions, Codable
-
See moreRSDUIActionObject
is a concrete implementation ofRSDUIAction
that can be used to customize the title and image displayed for a given action of the UI.Declaration
Swift
public struct RSDUIActionObject : RSDEmbeddedResourceUIAction, Codable
-
See moreRSDNavigationUIActionObject
implements an action for navigating to another step in a task.Declaration
Swift
public struct RSDNavigationUIActionObject : RSDEmbeddedResourceUIAction, RSDNavigationUIAction, Codable
-
See moreRSDReminderUIActionObject
implements an action for setting up a local notification to remind the participant about doing a particular task later.Declaration
Swift
public struct RSDReminderUIActionObject : RSDEmbeddedResourceUIAction, RSDReminderUIAction, Codable
-
See moreRSDWebViewUIActionObject
implements an action that includes a pointer to a url that can display in a webview. The url can either be fully qualified or optionally point to an embedded resource.Declaration
Swift
public struct RSDWebViewUIActionObject : RSDEmbeddedResourceUIAction, RSDWebViewUIAction, Codable
-
See moreRSDVideoViewUIActionObject
implements an action that includes a pointer to a url that can display in aAVPlayerViewController
. The url can either be fully qualified or optionally point to an embedded resource.Declaration
Swift
public struct RSDVideoViewUIActionObject : RSDEmbeddedResourceUIAction, RSDVideoViewUIAction, Codable
-
The type of the ui action. This is used to decode a
See moreRSDUIAction
using aRSDFactory
. It can also be used to customize the UI.Declaration
Swift
public struct RSDUIActionObjectType : RSDFactoryTypeRepresentable, Codable, Hashable
-
The type of transition style to use for displaying a UI component.
See moreDeclaration
Swift
public struct RSDTransitionStyle : RawRepresentable, Codable, Hashable
-
See moreRSDUSHeightPickerDataSourceObject
is a custom height picker for use when theLocale
uses US Customary units (not metric system).Declaration
Swift
public struct RSDUSHeightPickerDataSourceObject : RSDUSMeasurementPickerDataSource
-
See moreRSDUSInfantMassPickerDataSource
is a custom weight picker for use when theLocale
uses US Customary units (not metric system) and the mass is for an infant inlb, oz
.Declaration
Swift
public struct RSDUSInfantMassPickerDataSourceObject : RSDUSMeasurementPickerDataSource
-
See moreRSDUnitConverter
is a static struct for defined unit converters for converting between US English (imperial) to metric units. This is used to allow for displaying a person’s height or weight in imperial units, while storing the value in standardized metric units.Declaration
Swift
public struct RSDUnitConverter
-
See moreRSDViewThemeElementObject
tells the UI where to find the view controller to use when instantiating theRSDStepController
.Declaration
Swift
public struct RSDViewThemeElementObject : RSDViewThemeElement, RSDDecodableBundleInfo, Codable
-
A weekly schedule item is a light-weight codable struct that can be used to store and track events that happen at regularily scheduled intervals. This schedule assumes a ISO8601 7-day calendar.
- example:
Codable
protocol schema.let json = """ { "daysOfWeek": [1, 3, 5], "timeOfDay": "08:00" } """.data(using: .utf8)! // our data in native (JSON) format
Declaration
Swift
public struct RSDWeeklyScheduleObject : Codable, RSDSchedule
- example: