PROTOCOL

DataMapper

public protocol DataMapper

Interface for a DataMapper instance that provides mappings from IdsvrHaapiSdk models to IdsvrHaapiUIKit models.

Methods

mapHaapiResultToUIModel(haapiResult:)

func mapHaapiResultToUIModel(haapiResult: HaapiResult) throws -> UIModel

Maps a HaapiResult to a UIModel. The main mapper method that returns a UIModel when receiving a Haapi SDK model.

Parameters

Name Description
haapiResult the Haapi SDK HaapiResult instance to map.

mapRepresentationActionModelToUIInteractionModel(representationActionModel:)

func mapRepresentationActionModelToUIInteractionModel(
    representationActionModel: any RepresentationActionModel
) throws -> UIInteractionModel

Maps a RepresentationActionModel to a UIInteractionModel. It is called when it is necessary to map the contents of an RepresentationActionModel as a new interaction.

Parameters

Name Description
representationActionModel the Haapi SDK RepresentationActionModel instance to map.

mapHaapiRepresentationToInteraction(haapiRepresentation:)

func mapHaapiRepresentationToInteraction(haapiRepresentation: HaapiRepresentation) throws -> UIInteractionModel

Maps a HaapiRepresentation to a UIInteractionModel.

Parameters

Name Description
haapiRepresentation the Haapi SDK HaapiRepresentation instance to map.