ParameterDefinition.fromJson constructor

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

Implementation

factory ParameterDefinition.fromJson(Map<String, dynamic> json) {
  return ParameterDefinition(
    name: json['name'] as String,
    referencedByResources: (json['referencedByResources'] as List)
        .whereNotNull()
        .map((e) => e as String)
        .toList(),
    allowedPattern: json['allowedPattern'] as String?,
    allowedValues: (json['allowedValues'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
    constraintDescription: json['constraintDescription'] as String?,
    defaultValue: json['defaultValue'] as String?,
    description: json['description'] as String?,
    maxLength: json['maxLength'] as int?,
    maxValue: json['maxValue'] as int?,
    minLength: json['minLength'] as int?,
    minValue: json['minValue'] as int?,
    noEcho: json['noEcho'] as bool?,
    type: json['type'] as String?,
  );
}