WorkflowTransitions.fromJson constructor

WorkflowTransitions.fromJson(
  1. Map<String, Object?> json
)

Implementation

factory WorkflowTransitions.fromJson(Map<String, Object?> json) {
  return WorkflowTransitions(
    actions: (json[r'actions'] as List<Object?>?)
            ?.map((i) => WorkflowRuleConfiguration.fromJson(
                i as Map<String, Object?>? ?? const {}))
            .toList() ??
        [],
    conditions: json[r'conditions'] != null
        ? ConditionGroupConfiguration.fromJson(
            json[r'conditions']! as Map<String, Object?>)
        : null,
    customIssueEventId: json[r'customIssueEventId'] as String?,
    description: json[r'description'] as String?,
    from: (json[r'from'] as List<Object?>?)
            ?.map((i) => WorkflowStatusAndPort.fromJson(
                i as Map<String, Object?>? ?? const {}))
            .toList() ??
        [],
    id: json[r'id'] as String?,
    name: json[r'name'] as String?,
    properties: json[r'properties'] as Map<String, Object?>?,
    to: json[r'to'] != null
        ? WorkflowStatusAndPort.fromJson(json[r'to']! as Map<String, Object?>)
        : null,
    transitionScreen: json[r'transitionScreen'] != null
        ? WorkflowRuleConfiguration.fromJson(
            json[r'transitionScreen']! as Map<String, Object?>)
        : null,
    triggers: (json[r'triggers'] as List<Object?>?)
            ?.map((i) => WorkflowTrigger.fromJson(
                i as Map<String, Object?>? ?? const {}))
            .toList() ??
        [],
    type: json[r'type'] != null
        ? WorkflowTransitionsType.fromValue(json[r'type']! as String)
        : null,
    validators: (json[r'validators'] as List<Object?>?)
            ?.map((i) => WorkflowRuleConfiguration.fromJson(
                i as Map<String, Object?>? ?? const {}))
            .toList() ??
        [],
  );
}