TriggeringConfigVariant

public struct TriggeringConfigVariant : Hashable, Equatable

Defines a variant for which a trigger should be generated. The most vital part of the instance is the triggeringPoints property where TriggerType is the key, and TriggeringPoint is the value associated with that key.

For example, the following variant will be applicable for a trigger where the road is controlled access, for all countries, for comprehensive mode, only for roundabout instructions, and it has one triggering point (follow).

TriggeringConfigVariant(
   roadTypes: [.controlledAccess],
   regions: [.restOfTheWorld],
   announcementModes: [.comprehensive],
   instructionTypes: [.roundabout],
   triggeringPoints: [
       .follow: TriggeringPoint(
           recommendedDistance: TriggeringDistances(
               defaultDistance: Measurement.tt.kilometers(1000.0)
           ),
           messageDuration: 2
       )
   ]
)

Important

This is a Public Preview API. It may be changed or removed at any time.

Lifecycle

Public

  • The roads for which the config variant is applicable.

    Declaration

    Swift

    public let roadTypes: Set<TriggeringRoadType>
  • The regions for which the config variant is applicable.

    Declaration

    Swift

    public let regions: Set<TriggeringRegion>
  • The announcement modes for which the config variant is applicable.

    Declaration

    Swift

    public let announcementModes: Set<AnnouncementMode>
  • The instructions for which the config variant is applicable.

    Declaration

    Swift

    public let instructionTypes: Set<TriggeringInstructionType>
  • Triggering points define where the trigger of this variant must be exposed.

    Declaration

    Swift

    public let triggeringPoints: [TriggerType : TriggeringPoint]
  • Equality operator.

    Declaration

    Swift

    public static func == (lhs: TriggeringConfigVariant, rhs: TriggeringConfigVariant) -> Bool
  • Hashing function.

    Declaration

    Swift

    public func hash(into hasher: inout Hasher)

TriggeringConfigVariant.Error

  • An error that occurs during the creation of the instance.

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public enum Error : LocalizedError