ZendriveAccidentInfo
@interface ZendriveAccidentInfo : NSObject
ZendriveAccidentInfo
Wrapper for meta-information related to an accident detected by the SDK.
-
The unique Id of drive during which the accident occured
Declaration
Objective-C
@property (readonly, nonatomic, nonnull) NSString *driveId;
-
The location of the accident.
Declaration
Objective-C
@property (readonly, nonatomic, nonnull) ZendriveLocationPoint *accidentLocation;
-
The timestamp of the accident in milliseconds since epoch.
Declaration
Objective-C
@property (readonly, nonatomic) long long timestamp;
-
The session that was in progress when the accident occured, if a session was started in the SDK.
Declaration
Objective-C
@property (readonly, nonatomic, nullable) NSString *sessionId;
-
The tracking id of the ongoing drive when the accident occured.
See
+[Zendrive startManualDrive:completionHandler]
Declaration
Objective-C
@property (readonly, nonatomic, nullable) NSString *trackingId;
-
The confidence of detected accident.
Declaration
Objective-C
@property (readonly, nonatomic) ZendriveAccidentConfidence confidence;
-
A unique identifier of this accident.
Declaration
Objective-C
@property (readonly, nonatomic, nonnull) NSString *accidentId;
-
Initializer for
ZendriveAccidentInfo
.Declaration
Objective-C
- (nonnull id)initWithLocation:(nonnull ZendriveLocationPoint *)location timestamp:(long long)timestamp trackingId:(nullable NSString *)trackingId sessionId:(nullable NSString *)sessionId confidence:(ZendriveAccidentConfidence)confidence accidentId:(nonnull NSString *)accidentId driveId:(nonnull NSString *)driveId;
Parameters
location
The location of the accident
timestamp
The timestamp of the accident in milliseconds since epoch
trackingId
The tracking id of the ongoing drive when the accident occured
sessionId
The session that was in progress when the accident occured, if a session was started in the SDK
confidence
Confidence measure of the detected accident
accidentId
A unique identifier of this accident
driveId
The unique Id of drive during which the accident occured
Return Value
ZendriveAccidentInfo
object -
Returns a dictionary that represents the
ZendriveAccidentInfo
object.Declaration
Objective-C
- (nonnull NSDictionary *)toDictionary;
-
Returns a JSON formatted string that represents the
ZendriveAccidentInfo
object.Declaration
Objective-C
- (nonnull NSString *)toJson;