toJson method

Map<String, Object> toJson()

Converts a FlowSchemaCondition instance to JSON data.

Implementation

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

  final tempLastTransitionTime = lastTransitionTime;
  final tempMessage = message;
  final tempReason = reason;
  final tempStatus = status;
  final tempType = type;

  if (tempLastTransitionTime != null) {
    jsonData['lastTransitionTime'] = tempLastTransitionTime;
  }

  if (tempMessage != null) {
    jsonData['message'] = tempMessage;
  }

  if (tempReason != null) {
    jsonData['reason'] = tempReason;
  }

  if (tempStatus != null) {
    jsonData['status'] = tempStatus;
  }

  if (tempType != null) {
    jsonData['type'] = tempType;
  }

  return jsonData;
}