Job.fromJson constructor

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

Implementation

factory Job.fromJson(Map<String, dynamic> json) {
  return Job(
    allocatedCapacity: json['AllocatedCapacity'] as int?,
    command: json['Command'] != null
        ? JobCommand.fromJson(json['Command'] as Map<String, dynamic>)
        : null,
    connections: json['Connections'] != null
        ? ConnectionsList.fromJson(
            json['Connections'] as Map<String, dynamic>)
        : null,
    createdOn: timeStampFromJson(json['CreatedOn']),
    defaultArguments: (json['DefaultArguments'] as Map<String, dynamic>?)
        ?.map((k, e) => MapEntry(k, e as String)),
    description: json['Description'] as String?,
    executionProperty: json['ExecutionProperty'] != null
        ? ExecutionProperty.fromJson(
            json['ExecutionProperty'] as Map<String, dynamic>)
        : null,
    glueVersion: json['GlueVersion'] as String?,
    lastModifiedOn: timeStampFromJson(json['LastModifiedOn']),
    logUri: json['LogUri'] as String?,
    maxCapacity: json['MaxCapacity'] as double?,
    maxRetries: json['MaxRetries'] as int?,
    name: json['Name'] as String?,
    nonOverridableArguments:
        (json['NonOverridableArguments'] as Map<String, dynamic>?)
            ?.map((k, e) => MapEntry(k, e as String)),
    notificationProperty: json['NotificationProperty'] != null
        ? NotificationProperty.fromJson(
            json['NotificationProperty'] as Map<String, dynamic>)
        : null,
    numberOfWorkers: json['NumberOfWorkers'] as int?,
    role: json['Role'] as String?,
    securityConfiguration: json['SecurityConfiguration'] as String?,
    timeout: json['Timeout'] as int?,
    workerType: (json['WorkerType'] as String?)?.toWorkerType(),
  );
}