toJson method

Map<String, Object> toJson()

Converts a StatefulSetCondition 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;
  }

  jsonData['status'] = tempStatus;

  jsonData['type'] = tempType;

  return jsonData;
}