PodSchedulingContextSpec.fromJson constructor

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

Creates a PodSchedulingContextSpec from JSON data.

Implementation

factory PodSchedulingContextSpec.fromJson(Map<String, dynamic> json) {
  final tempPotentialNodesJson = json['potentialNodes'];
  final tempSelectedNodeJson = json['selectedNode'];

  final List<String>? tempPotentialNodes = tempPotentialNodesJson != null
      ? List<String>.from(tempPotentialNodesJson)
      : null;
  final String? tempSelectedNode = tempSelectedNodeJson;

  return PodSchedulingContextSpec(
    potentialNodes: tempPotentialNodes,
    selectedNode: tempSelectedNode,
  );
}