ResourceClaimTemplateSpec.fromJson constructor

ResourceClaimTemplateSpec.fromJson(
  1. Map<String, dynamic> json
)

Creates a ResourceClaimTemplateSpec from JSON data.

Implementation

factory ResourceClaimTemplateSpec.fromJson(Map<String, dynamic> json) {
  final tempMetadataJson = json['metadata'];
  final tempSpecJson = json['spec'];

  final ObjectMeta? tempMetadata =
      tempMetadataJson != null ? ObjectMeta.fromJson(tempMetadataJson) : null;
  final ResourceClaimSpec tempSpec = ResourceClaimSpec.fromJson(tempSpecJson);

  return ResourceClaimTemplateSpec(
    metadata: tempMetadata,
    spec: tempSpec,
  );
}