TransitionUpdateDTO.fromJson constructor

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

Implementation

factory TransitionUpdateDTO.fromJson(Map<String, Object?> json) {
  return TransitionUpdateDTO(
    actions: (json[r'actions'] as List<Object?>?)
            ?.map((i) => WorkflowRuleConfiguration.fromJson(
                i as Map<String, Object?>? ?? const {}))
            .toList() ??
        [],
    conditions: json[r'conditions'] != null
        ? ConditionGroupUpdate.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) => StatusReferenceAndPort.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
        ? StatusReferenceAndPort.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: TransitionUpdateDTOType.fromValue(json[r'type'] as String? ?? ''),
    validators: (json[r'validators'] as List<Object?>?)
            ?.map((i) => WorkflowRuleConfiguration.fromJson(
                i as Map<String, Object?>? ?? const {}))
            .toList() ??
        [],
  );
}