AutomationExecutionMetadata.fromJson constructor

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

Implementation

factory AutomationExecutionMetadata.fromJson(Map<String, dynamic> json) {
  return AutomationExecutionMetadata(
    associationId: json['AssociationId'] as String?,
    automationExecutionId: json['AutomationExecutionId'] as String?,
    automationExecutionStatus: (json['AutomationExecutionStatus'] as String?)
        ?.toAutomationExecutionStatus(),
    automationSubtype:
        (json['AutomationSubtype'] as String?)?.toAutomationSubtype(),
    automationType: (json['AutomationType'] as String?)?.toAutomationType(),
    changeRequestName: json['ChangeRequestName'] as String?,
    currentAction: json['CurrentAction'] as String?,
    currentStepName: json['CurrentStepName'] as String?,
    documentName: json['DocumentName'] as String?,
    documentVersion: json['DocumentVersion'] as String?,
    executedBy: json['ExecutedBy'] as String?,
    executionEndTime: timeStampFromJson(json['ExecutionEndTime']),
    executionStartTime: timeStampFromJson(json['ExecutionStartTime']),
    failureMessage: json['FailureMessage'] as String?,
    logFile: json['LogFile'] as String?,
    maxConcurrency: json['MaxConcurrency'] as String?,
    maxErrors: json['MaxErrors'] as String?,
    mode: (json['Mode'] as String?)?.toExecutionMode(),
    opsItemId: json['OpsItemId'] as String?,
    outputs: (json['Outputs'] as Map<String, dynamic>?)?.map((k, e) =>
        MapEntry(
            k, (e as List).whereNotNull().map((e) => e as String).toList())),
    parentAutomationExecutionId:
        json['ParentAutomationExecutionId'] as String?,
    resolvedTargets: json['ResolvedTargets'] != null
        ? ResolvedTargets.fromJson(
            json['ResolvedTargets'] as Map<String, dynamic>)
        : null,
    runbooks: (json['Runbooks'] as List?)
        ?.whereNotNull()
        .map((e) => Runbook.fromJson(e as Map<String, dynamic>))
        .toList(),
    scheduledTime: timeStampFromJson(json['ScheduledTime']),
    target: json['Target'] as String?,
    targetMaps: (json['TargetMaps'] as List?)
        ?.whereNotNull()
        .map((e) => (e as Map<String, dynamic>).map((k, e) => MapEntry(
            k, (e as List).whereNotNull().map((e) => e as String).toList())))
        .toList(),
    targetParameterName: json['TargetParameterName'] as String?,
    targets: (json['Targets'] as List?)
        ?.whereNotNull()
        .map((e) => Target.fromJson(e as Map<String, dynamic>))
        .toList(),
  );
}