toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  return {
    'versionId': versionId,
    'registrationId': registrationId.toJson(),
    'scriptURL': scriptURL,
    'runningStatus': runningStatus.toJson(),
    'status': status.toJson(),
    if (scriptLastModified != null) 'scriptLastModified': scriptLastModified,
    if (scriptResponseTime != null) 'scriptResponseTime': scriptResponseTime,
    if (controlledClients != null)
      'controlledClients': controlledClients!.map((e) => e.toJson()).toList(),
    if (targetId != null) 'targetId': targetId!.toJson(),
  };
}