PodTemplate.fromJson constructor
Creates a PodTemplate from JSON data.
Implementation
factory PodTemplate.fromJson(Map<String, dynamic> json) {
final tempApiVersionJson = json['apiVersion'];
final tempKindJson = json['kind'];
final tempMetadataJson = json['metadata'];
final tempTemplateJson = json['template'];
final String? tempApiVersion = tempApiVersionJson;
final String? tempKind = tempKindJson;
final ObjectMeta? tempMetadata =
tempMetadataJson != null ? ObjectMeta.fromJson(tempMetadataJson) : null;
final PodTemplateSpec? tempTemplate = tempTemplateJson != null
? PodTemplateSpec.fromJson(tempTemplateJson)
: null;
return PodTemplate(
apiVersion: tempApiVersion,
kind: tempKind,
metadata: tempMetadata,
template: tempTemplate,
);
}