toJson method

Map<String, Object> toJson()

Converts a NamespaceStatus instance to JSON data.

Implementation

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

  final tempConditions = conditions;
  final tempPhase = phase;

  if (tempConditions != null) {
    jsonData['conditions'] =
        tempConditions.map((e) => e.toJson()).toList(growable: false);
  }

  if (tempPhase != null) {
    jsonData['phase'] = tempPhase;
  }

  return jsonData;
}