HumanTaskConfig.fromJson constructor

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

Implementation

factory HumanTaskConfig.fromJson(Map<String, dynamic> json) {
  return HumanTaskConfig(
    annotationConsolidationConfig: AnnotationConsolidationConfig.fromJson(
        json['AnnotationConsolidationConfig'] as Map<String, dynamic>),
    numberOfHumanWorkersPerDataObject:
        json['NumberOfHumanWorkersPerDataObject'] as int,
    preHumanTaskLambdaArn: json['PreHumanTaskLambdaArn'] as String,
    taskDescription: json['TaskDescription'] as String,
    taskTimeLimitInSeconds: json['TaskTimeLimitInSeconds'] as int,
    taskTitle: json['TaskTitle'] as String,
    uiConfig: UiConfig.fromJson(json['UiConfig'] as Map<String, dynamic>),
    workteamArn: json['WorkteamArn'] as String,
    maxConcurrentTaskCount: json['MaxConcurrentTaskCount'] as int?,
    publicWorkforceTaskPrice: json['PublicWorkforceTaskPrice'] != null
        ? PublicWorkforceTaskPrice.fromJson(
            json['PublicWorkforceTaskPrice'] as Map<String, dynamic>)
        : null,
    taskAvailabilityLifetimeInSeconds:
        json['TaskAvailabilityLifetimeInSeconds'] as int?,
    taskKeywords: (json['TaskKeywords'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
  );
}