JobTemplate.fromJson constructor

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

Implementation

factory JobTemplate.fromJson(Map<String, dynamic> json) {
  return JobTemplate(
    name: json['name'] as String,
    settings: JobTemplateSettings.fromJson(
        json['settings'] as Map<String, dynamic>),
    accelerationSettings: json['accelerationSettings'] != null
        ? AccelerationSettings.fromJson(
            json['accelerationSettings'] as Map<String, dynamic>)
        : null,
    arn: json['arn'] as String?,
    category: json['category'] as String?,
    createdAt: timeStampFromJson(json['createdAt']),
    description: json['description'] as String?,
    hopDestinations: (json['hopDestinations'] as List?)
        ?.whereNotNull()
        .map((e) => HopDestination.fromJson(e as Map<String, dynamic>))
        .toList(),
    lastUpdated: timeStampFromJson(json['lastUpdated']),
    priority: json['priority'] as int?,
    queue: json['queue'] as String?,
    statusUpdateInterval:
        (json['statusUpdateInterval'] as String?)?.toStatusUpdateInterval(),
    type: (json['type'] as String?)?.toType(),
  );
}