PriorityLevelConfigurationSpec.fromJson constructor

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

Creates a PriorityLevelConfigurationSpec from JSON data.

Implementation

factory PriorityLevelConfigurationSpec.fromJson(Map<String, dynamic> json) {
  final tempLimitedJson = json['limited'];
  final tempTypeJson = json['type'];

  final LimitedPriorityLevelConfiguration? tempLimited =
      tempLimitedJson != null
          ? LimitedPriorityLevelConfiguration.fromJson(tempLimitedJson)
          : null;
  final String tempType = tempTypeJson;

  return PriorityLevelConfigurationSpec(
    limited: tempLimited,
    type: tempType,
  );
}