WeightedPodAffinityTerm.fromJson constructor

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

Creates a WeightedPodAffinityTerm from JSON data.

Implementation

factory WeightedPodAffinityTerm.fromJson(Map<String, dynamic> json) {
  final tempPodAffinityTermJson = json['podAffinityTerm'];
  final tempWeightJson = json['weight'];

  final PodAffinityTerm tempPodAffinityTerm =
      PodAffinityTerm.fromJson(tempPodAffinityTermJson);
  final int tempWeight = tempWeightJson;

  return WeightedPodAffinityTerm(
    podAffinityTerm: tempPodAffinityTerm,
    weight: tempWeight,
  );
}