CSIStorageCapacity.fromJson constructor
Creates a CSIStorageCapacity from JSON data.
Implementation
factory CSIStorageCapacity.fromJson(Map<String, dynamic> json) {
final tempApiVersionJson = json['apiVersion'];
final tempCapacityJson = json['capacity'];
final tempKindJson = json['kind'];
final tempMaximumVolumeSizeJson = json['maximumVolumeSize'];
final tempMetadataJson = json['metadata'];
final tempNodeTopologyJson = json['nodeTopology'];
final tempStorageClassNameJson = json['storageClassName'];
final String? tempApiVersion = tempApiVersionJson;
final String? tempCapacity = tempCapacityJson;
final String? tempKind = tempKindJson;
final String? tempMaximumVolumeSize = tempMaximumVolumeSizeJson;
final ObjectMeta? tempMetadata =
tempMetadataJson != null ? ObjectMeta.fromJson(tempMetadataJson) : null;
final LabelSelector? tempNodeTopology = tempNodeTopologyJson != null
? LabelSelector.fromJson(tempNodeTopologyJson)
: null;
final String tempStorageClassName = tempStorageClassNameJson;
return CSIStorageCapacity(
apiVersion: tempApiVersion,
capacity: tempCapacity,
kind: tempKind,
maximumVolumeSize: tempMaximumVolumeSize,
metadata: tempMetadata,
nodeTopology: tempNodeTopology,
storageClassName: tempStorageClassName,
);
}