JobMetadata.fromJson constructor
JobMetadata.fromJson(
- Map<String, dynamic> json
)
Implementation
factory JobMetadata.fromJson(Map<String, dynamic> json) {
return JobMetadata(
addressId: json['AddressId'] as String?,
clusterId: json['ClusterId'] as String?,
creationDate: timeStampFromJson(json['CreationDate']),
dataTransferProgress: json['DataTransferProgress'] != null
? DataTransfer.fromJson(
json['DataTransferProgress'] as Map<String, dynamic>)
: null,
description: json['Description'] as String?,
deviceConfiguration: json['DeviceConfiguration'] != null
? DeviceConfiguration.fromJson(
json['DeviceConfiguration'] as Map<String, dynamic>)
: null,
forwardingAddressId: json['ForwardingAddressId'] as String?,
jobId: json['JobId'] as String?,
jobLogInfo: json['JobLogInfo'] != null
? JobLogs.fromJson(json['JobLogInfo'] as Map<String, dynamic>)
: null,
jobState: (json['JobState'] as String?)?.toJobState(),
jobType: (json['JobType'] as String?)?.toJobType(),
kmsKeyARN: json['KmsKeyARN'] as String?,
notification: json['Notification'] != null
? Notification.fromJson(json['Notification'] as Map<String, dynamic>)
: null,
resources: json['Resources'] != null
? JobResource.fromJson(json['Resources'] as Map<String, dynamic>)
: null,
roleARN: json['RoleARN'] as String?,
shippingDetails: json['ShippingDetails'] != null
? ShippingDetails.fromJson(
json['ShippingDetails'] as Map<String, dynamic>)
: null,
snowballCapacityPreference:
(json['SnowballCapacityPreference'] as String?)?.toSnowballCapacity(),
snowballType: (json['SnowballType'] as String?)?.toSnowballType(),
taxDocuments: json['TaxDocuments'] != null
? TaxDocuments.fromJson(json['TaxDocuments'] as Map<String, dynamic>)
: null,
);
}