CustomResourceDefinitionStatus.fromJson constructor
Creates a CustomResourceDefinitionStatus from JSON data.
Implementation
factory CustomResourceDefinitionStatus.fromJson(Map<String, dynamic> json) {
final tempAcceptedNamesJson = json['acceptedNames'];
final tempConditionsJson = json['conditions'];
final tempStoredVersionsJson = json['storedVersions'];
final CustomResourceDefinitionNames? tempAcceptedNames =
tempAcceptedNamesJson != null
? CustomResourceDefinitionNames.fromJson(tempAcceptedNamesJson)
: null;
final List<CustomResourceDefinitionCondition>? tempConditions =
tempConditionsJson != null
? List<dynamic>.from(tempConditionsJson)
.map(
(e) => CustomResourceDefinitionCondition.fromJson(
Map<String, dynamic>.from(e),
),
)
.toList()
: null;
final List<String>? tempStoredVersions = tempStoredVersionsJson != null
? List<String>.from(tempStoredVersionsJson)
: null;
return CustomResourceDefinitionStatus(
acceptedNames: tempAcceptedNames,
conditions: tempConditions,
storedVersions: tempStoredVersions,
);
}