toJson method

Map<String, Object> toJson()

Converts a CustomResourceDefinitionStatus instance to JSON data.

Implementation

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

  final tempAcceptedNames = acceptedNames;
  final tempConditions = conditions;
  final tempStoredVersions = storedVersions;

  if (tempAcceptedNames != null) {
    jsonData['acceptedNames'] = tempAcceptedNames.toJson();
  }

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

  if (tempStoredVersions != null) {
    jsonData['storedVersions'] = tempStoredVersions;
  }

  return jsonData;
}