PodSchedulingContextStatus.fromJson constructor

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

Creates a PodSchedulingContextStatus from JSON data.

Implementation

factory PodSchedulingContextStatus.fromJson(Map<String, dynamic> json) {
  final tempResourceClaimsJson = json['resourceClaims'];

  final List<ResourceClaimSchedulingStatus>? tempResourceClaims =
      tempResourceClaimsJson != null
          ? List<dynamic>.from(tempResourceClaimsJson)
              .map(
                (e) => ResourceClaimSchedulingStatus.fromJson(
                  Map<String, dynamic>.from(e),
                ),
              )
              .toList()
          : null;

  return PodSchedulingContextStatus(
    resourceClaims: tempResourceClaims,
  );
}