Alert

public struct Alert : Decodable, Identifiable

Alerts communicate information about hazardous, potentially hazardous, or changing conditions that may affect a visit to a national park. Alert data includes the type of alert, title, description, and optional link to additional information.

  • id

    Unique identifier for an alert record

    Declaration

    Swift

    public let id: String
  • A variable width character code used to identify a specific park

    Declaration

    Swift

    public let parkCode: String
  • Alert title

    Declaration

    Swift

    public let title: String
  • Alert description

    Declaration

    Swift

    public let description: String
  • Alert type: danger, caution, information, or park closure

    Declaration

    Swift

    public let category: String
  • url

    Link to more information about the alert, if available

    Declaration

    Swift

    public let url: URL?
  • Declaration

    Swift

    public init(from decoder: Decoder) throws