RouteRefreshResponse

public struct RouteRefreshResponse
extension RouteRefreshResponse: Codable

A Directions Refresh API response.

  • The raw HTTP response from the Directions Refresh API.

    Declaration

    Swift

    public let httpResponse: HTTPURLResponse?
  • The response identifier used to request the refreshed route.

    Declaration

    Swift

    public let identifier: String
  • The route index used to request the refreshed route.

    Declaration

    Swift

    public var routeIndex: Int
  • A skeleton route that contains only the time-sensitive information that has been updated.

    Use the Route.refreshLegAttributes(from:) method to merge this object with the original route to continue using the original route with updated information.

    Declaration

    Swift

    public var route: RefreshedRoute
  • The credentials used to make the request.

    Declaration

    Swift

    public let credentials: DirectionsCredentials
  • The time when this RouteRefreshResponse object was created, which is immediately upon recieving the raw URL response.

    If you manually start fetching a task returned by Directions.urlRequest(forRefreshing:routeIndex:currentLegIndex:), this property is set to nil; use the URLSessionTaskTransactionMetrics.responseEndDate property instead. This property may also be set to nil if you create this result from a JSON object or encoded object.

    This property does not persist after encoding and decoding.

    Declaration

    Swift

    public var created: Date
  • Declaration

    Swift

    public init(from decoder: Decoder) throws
  • Declaration

    Swift

    public func encode(to encoder: Encoder) throws