toJson method

Map<String, Object> toJson()

Converts a QueuingConfiguration instance to JSON data.

Implementation

Map<String, Object> toJson() {
  final jsonData = <String, Object>{};

  final tempHandSize = handSize;
  final tempQueueLengthLimit = queueLengthLimit;
  final tempQueues = queues;

  if (tempHandSize != null) {
    jsonData['handSize'] = tempHandSize;
  }

  if (tempQueueLengthLimit != null) {
    jsonData['queueLengthLimit'] = tempQueueLengthLimit;
  }

  if (tempQueues != null) {
    jsonData['queues'] = tempQueues;
  }

  return jsonData;
}