ComponentStatus.fromJson constructor
Creates a ComponentStatus from JSON data.
Implementation
factory ComponentStatus.fromJson(Map<String, dynamic> json) {
final tempApiVersionJson = json['apiVersion'];
final tempConditionsJson = json['conditions'];
final tempKindJson = json['kind'];
final tempMetadataJson = json['metadata'];
final String? tempApiVersion = tempApiVersionJson;
final List<ComponentCondition>? tempConditions = tempConditionsJson != null
? List<dynamic>.from(tempConditionsJson)
.map(
(e) => ComponentCondition.fromJson(
Map<String, dynamic>.from(e),
),
)
.toList()
: null;
final String? tempKind = tempKindJson;
final ObjectMeta? tempMetadata =
tempMetadataJson != null ? ObjectMeta.fromJson(tempMetadataJson) : null;
return ComponentStatus(
apiVersion: tempApiVersion,
conditions: tempConditions,
kind: tempKind,
metadata: tempMetadata,
);
}