# GoogleNavigation Framework Reference

# GMSNavigationMutableSpeedAlertOptions

    @interface GMSNavigationMutableSpeedAlertOptions
        : https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationSpeedAlertOptions.html

A mutable class that defines triggering thresholds for different severities of speed alerts,
represented by `https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Enums/GMSNavigationSpeedAlertSeverity.html`.
- `


  ### [severityUpgradeDurationSeconds](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationMutableSpeedAlertOptions#/c:objc(cs)GMSNavigationMutableSpeedAlertOptions(py)severityUpgradeDurationSeconds)


  ` The duration threshold controls the speed alert severity upgrade. A major speed alert is
  triggered when the speed exceeds the minor speed alert threshold for more than the given number
  of seconds. This duration threshold is used only if the minor threshold percentage is set. A
  negative value indicates no duration threshold.

  #### Declaration

  Swift

      var severityUpgradeDurationSeconds: TimeInterval { get set }

  Objective-C

      @property (nonatomic) NSTimeInterval severityUpgradeDurationSeconds;

- `


  ### [-setSpeedAlertThresholdPercentage:forSpeedAlertSeverity:](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationMutableSpeedAlertOptions#/c:objc(cs)GMSNavigationMutableSpeedAlertOptions(im)setSpeedAlertThresholdPercentage:forSpeedAlertSeverity:)


  ` Sets the speed alert threshold in percentage for the specific `https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Enums/GMSNavigationSpeedAlertSeverity.html`.
  One severity of speed alert is triggered when the speed exceeds the corresponding threshold.

  If both minor and major speed alert threshold are set, the major speed alert threshold must be
  smaller than the major one. If only one speed alert severity's threshold is set, the other
  severity of speed alert will not be triggered.

  If you set the minor threshold to a value larger than the major threshold, the options updates
  the major threshold to equal the minor threshold. And vice versa.

  #### Declaration

  Swift

      func setSpeedAlertThresholdPercentage(_ percentageAboveLimit: CGFloat, for speedAlertSeverity: https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Enums/GMSNavigationSpeedAlertSeverity.html)

  Objective-C

      - (void)setSpeedAlertThresholdPercentage:(CGFloat)percentageAboveLimit
                         forSpeedAlertSeverity:
                             (https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Enums/GMSNavigationSpeedAlertSeverity.html)speedAlertSeverity;

  #### Parameters

  |---|---|
  | ` percentageAboveLimit ` | Percentage threshold above the speed limit. A value of 0.0 represents 0%, and 1.0 represents 100%. A negative value indicates no threshold being set for that speedingType. |
  | ` speedAlertSeverity ` | Speed alert severity for the given threshold. |