Operation.fromJson constructor

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

Implementation

factory Operation.fromJson(Map<String, dynamic> json) {
  return Operation(
    createDate: timeStampFromJson(json['CreateDate']),
    errorCode: json['ErrorCode'] as String?,
    errorMessage: json['ErrorMessage'] as String?,
    id: json['Id'] as String?,
    status: (json['Status'] as String?)?.toOperationStatus(),
    targets: (json['Targets'] as Map<String, dynamic>?)
        ?.map((k, e) => MapEntry(k.toOperationTargetType(), e as String)),
    type: (json['Type'] as String?)?.toOperationType(),
    updateDate: timeStampFromJson(json['UpdateDate']),
  );
}