MessageInfo.fromJson constructor

MessageInfo.fromJson(
  1. Map<String, dynamic> json
)

Creates a instance of MessageInfo from JsonMap.

Implementation

factory MessageInfo.fromJson(Map<String, dynamic> json) => MessageInfo(
    errors: json['errors'],
    status: MessageStatus.values
        .where((element) => element.name == (json['status'] as String))
        .first,
    completedAt: json['completedAt'] as String?,
    messageId: json['messageId'] as String,
    queueId: json['queueId'] as String,
    queueName: json['queueName'] as String,
    startedAt: json['startedAt'] as String?,
    submittedAt: json['submittedAt'] as String);