toJson method

Map<String, Object> toJson()

Converts a Condition instance to JSON data.

Implementation

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

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

  jsonData['lastTransitionTime'] = tempLastTransitionTime;

  jsonData['message'] = tempMessage;

  if (tempObservedGeneration != null) {
    jsonData['observedGeneration'] = tempObservedGeneration;
  }

  jsonData['reason'] = tempReason;

  jsonData['status'] = tempStatus;

  jsonData['type'] = tempType;

  return jsonData;
}