PersistentVolumeClaim.fromJson constructor
Creates a PersistentVolumeClaim from JSON data.
Implementation
factory PersistentVolumeClaim.fromJson(Map<String, dynamic> json) {
final tempApiVersionJson = json['apiVersion'];
final tempKindJson = json['kind'];
final tempMetadataJson = json['metadata'];
final tempSpecJson = json['spec'];
final tempStatusJson = json['status'];
final String? tempApiVersion = tempApiVersionJson;
final String? tempKind = tempKindJson;
final ObjectMeta? tempMetadata =
tempMetadataJson != null ? ObjectMeta.fromJson(tempMetadataJson) : null;
final PersistentVolumeClaimSpec? tempSpec = tempSpecJson != null
? PersistentVolumeClaimSpec.fromJson(tempSpecJson)
: null;
final PersistentVolumeClaimStatus? tempStatus = tempStatusJson != null
? PersistentVolumeClaimStatus.fromJson(tempStatusJson)
: null;
return PersistentVolumeClaim(
apiVersion: tempApiVersion,
kind: tempKind,
metadata: tempMetadata,
spec: tempSpec,
status: tempStatus,
);
}