MBNNWaypoint.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. // This file is generated and will be overwritten automatically.
  2. #import <Foundation/Foundation.h>
  3. #import <CoreLocation/CoreLocation.h>
  4. #import <MapboxNavigationNative/MBNNWaypointType.h>
  5. @class MBNNChargingWaypointMetadata;
  6. /**
  7. * Waypoint object from Directions API route response.
  8. * https://docs.mapbox.com/api/navigation/directions/#waypoint-object
  9. */
  10. NS_SWIFT_NAME(Waypoint)
  11. __attribute__((visibility ("default")))
  12. @interface MBNNWaypoint : NSObject
  13. // This class provides custom init which should be called
  14. - (nonnull instancetype)init NS_UNAVAILABLE;
  15. // This class provides custom init which should be called
  16. + (nonnull instancetype)new NS_UNAVAILABLE;
  17. - (nonnull instancetype)initWithName:(nonnull NSString *)name
  18. location:(CLLocationCoordinate2D)location
  19. distance:(nullable NSNumber *)distance
  20. metadata:(nullable MBNNChargingWaypointMetadata *)metadata
  21. target:(nullable CLLocation *)target
  22. type:(MBNNWaypointType)type;
  23. /**
  24. * Field name as is from direction's response.
  25. * Or corresponding value from a request URI param `waypoint_names` if there is no waypoints in the route response.
  26. */
  27. @property (nonatomic, readonly, nonnull, copy) NSString *name;
  28. /** Field location as is from direction's response. */
  29. @property (nonatomic, readonly) CLLocationCoordinate2D location;
  30. /** Field distance as is from direction's response. */
  31. @property (nonatomic, readonly, nullable) NSNumber *distance;
  32. /** Field metadata as is from direction's response. */
  33. @property (nonatomic, readonly, nullable) MBNNChargingWaypointMetadata *metadata;
  34. /** Corresponding value from a route request URI param `waypoint_targets`. */
  35. @property (nonatomic, readonly, nullable) CLLocation *target;
  36. /**
  37. * Type of waypoint.
  38. * Silent type calculates based on `via_vaypoints` field, or segment's source of each leg for legacy routes.
  39. * EvCharging type calculates based on `metadata` field.
  40. */
  41. @property (nonatomic, readonly) MBNNWaypointType type;
  42. - (BOOL)isEqualToWaypoint:(nonnull MBNNWaypoint *)other;
  43. @end