STRUCT

FormActionModel

Contents

public struct FormActionModel: RepresentationActionModel

Model for FormAction, providing the information specific to form actions, such as the form fields.

Properties

actionTitle

public let actionTitle: Message?

Title of the action of the model, typically visible to the user as a button label. Should be human-readable.

continueActions

public let continueActions: [Action]

A array of Action which allows the client to proceed with the flow.

errorActions

public let errorActions: [Action]

A array of Action which can be used if an error happens.

fields

public let fields: [FormField]

A array of FormField that needs to be rendered on the screen so the user can interact with it.

type

public let type: String

A String that represents a media-type used to represent the form's contents.

method

public let method: String

A String that represents the HTTP method.

href

public let href: String

A String that represents a target URI.

Methods

init(from:)

public init(from decoder: Decoder) throws

Parameters

Name Description
decoder The decoder to read data from.

encode(to:)

public func encode(to encoder: Encoder) throws

Parameters

Name Description
encoder The encoder to write data to.

==(::)

public static func == (lhs: FormActionModel, rhs: FormActionModel) -> Bool

Parameters

Name Description
lhs A value to compare.
rhs Another value to compare.