RelayDeliveryTarget.fromJson constructor
RelayDeliveryTarget.fromJson(
- Map<String, dynamic> json
)
Implementation
factory RelayDeliveryTarget.fromJson(Map<String, dynamic> json) {
return RelayDeliveryTarget(
eventId: json['eventId'] as String,
relayUrl: json['relayUrl'] as String,
reason: RelayDeliveryReason.values.byName(json['reason'] as String),
state: RelayDeliveryState.values.byName(json['state'] as String),
attemptCount: json['attemptCount'] as int? ?? 0,
lastAttemptAt: json['lastAttemptAt'] as int?,
nextRetryAt: json['nextRetryAt'] as int?,
lastError: json['lastError'] as String?,
lastOkMessage: json['lastOkMessage'] as String?,
);
}