toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  return {
    if (scriptSourceUrl != null) 'scriptSourceUrl': scriptSourceUrl,
    if (dataOrigin != null) 'dataOrigin': dataOrigin,
    if (operationName != null) 'operationName': operationName,
    if (operationId != null) 'operationId': operationId,
    if (keepAlive != null) 'keepAlive': keepAlive,
    if (privateAggregationConfig != null)
      'privateAggregationConfig': privateAggregationConfig!.toJson(),
    if (serializedData != null) 'serializedData': serializedData,
    if (urlsWithMetadata != null)
      'urlsWithMetadata': urlsWithMetadata!.map((e) => e.toJson()).toList(),
    if (urnUuid != null) 'urnUuid': urnUuid,
    if (key != null) 'key': key,
    if (value != null) 'value': value,
    if (ignoreIfPresent != null) 'ignoreIfPresent': ignoreIfPresent,
    if (workletOrdinal != null) 'workletOrdinal': workletOrdinal,
    if (workletTargetId != null) 'workletTargetId': workletTargetId!.toJson(),
    if (withLock != null) 'withLock': withLock,
    if (batchUpdateId != null) 'batchUpdateId': batchUpdateId,
    if (batchSize != null) 'batchSize': batchSize,
  };
}