WorkflowCapabilities.fromJson constructor
Implementation
factory WorkflowCapabilities.fromJson(Map<String, Object?> json) {
return WorkflowCapabilities(
connectRules: (json[r'connectRules'] as List<Object?>?)
?.map((i) => AvailableWorkflowConnectRule.fromJson(
i as Map<String, Object?>? ?? const {}))
.toList() ??
[],
editorScope: json[r'editorScope'] != null
? WorkflowCapabilitiesEditorScope.fromValue(
json[r'editorScope']! as String)
: null,
forgeRules: (json[r'forgeRules'] as List<Object?>?)
?.map((i) => AvailableWorkflowForgeRule.fromJson(
i as Map<String, Object?>? ?? const {}))
.toList() ??
[],
projectTypes: (json[r'projectTypes'] as List<Object?>?)
?.map((i) => WorkflowCapabilitiesProjectTypes.fromValue(
i as String? ?? ''))
.toList() ??
[],
systemRules: (json[r'systemRules'] as List<Object?>?)
?.map((i) => AvailableWorkflowSystemRule.fromJson(
i as Map<String, Object?>? ?? const {}))
.toList() ??
[],
triggerRules: (json[r'triggerRules'] as List<Object?>?)
?.map((i) => AvailableWorkflowTriggers.fromJson(
i as Map<String, Object?>? ?? const {}))
.toList() ??
[],
);
}