STRUCT

FormActionModel

Contents

swift
public struct FormActionModel: RepresentationActionModel

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

Properties

actionTitle

swift
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

swift
public let continueActions: [Action]

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

errorActions

swift
public let errorActions: [Action]

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

fields

swift
public let fields: [FormField]

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

type

swift
public let type: String

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

method

swift
public let method: String

A String that represents the HTTP method.

href

swift
public let href: String

A String that represents a target URI.

Methods

init(from:)

swift
public init(from decoder: Decoder) throws

Parameters

Name Description
decoder The decoder to read data from.

encode(to:)

swift
public func encode(to encoder: Encoder) throws

Parameters

Name Description
encoder The encoder to write data to.

==(::)

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

Parameters

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