PROTOCOL
DataMapper
public protocol DataMapper
Interface for a DataMapper instance that provides mappings from IdsvrHaapiSdk models to IdsvrHaapiUIKit models.
- Experiment: This is an experimental API. It may be changed or removed in the future.
 
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:
- haapiResult: the Haapi SDK 
HaapiResultinstance to map. 
 - haapiResult: the Haapi SDK 
 - Returns: A mapped UIModel that can be used in the UIKit framework.
 - Throws: 
HaapiUIKitError.unsupportedMapIf an issue occurs while mapping the objects. 
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:
- representationActionModel: the Haapi SDK 
RepresentationActionModelinstance to map. 
 - representationActionModel: the Haapi SDK 
 - Returns: A mapped 
UIInteractionModelthat can be used in the UIKit framework. - Throws: 
HaapiUIKitError.unsupportedMapIf an issue occurs while mapping the objects. 
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:
- haapiRepresentation: the Haapi SDK 
HaapiRepresentationinstance to map. 
 - haapiRepresentation: the Haapi SDK 
 - Returns: A mapped 
UIInteractionModelthat can be used in the UIKit framework. - Throws: 
HaapiUIKitError.unsupportedMapIf an issue occurs while mapping the objects. 
Parameters
| Name | Description | 
|---|---|
| haapiRepresentation | the Haapi SDK HaapiRepresentation instance to map. |