ServiceTemplateVariable.fromJson constructor
ServiceTemplateVariable.fromJson(
- Map<String, dynamic> json
)
Implementation
factory ServiceTemplateVariable.fromJson(Map<String, dynamic> json) {
return ServiceTemplateVariable(
name: json['name'] as String,
description: json['description'] as String?,
obscure: json['obscure'] ?? false,
optional: json['optional'] ?? false,
type: json['type'],
enumValues: (json['enum'] as List<dynamic>?)?.map((e) => e.toString()).toList(),
annotations: (json["annotations"] as Map?)?.cast<String, String>(),
);
}