if (jobDetailResource != null){
JobDetails jobDetails = new JobDetails();
jobDetails.setJobID(jobDetailResource.getJobId());
jobDetails.setJobDescription(jobDetailResource.getJobDescription());
jobDetails.setCreationTime(jobDetailResource.getCreationTime().getTime());
StatusResource jobStatus = jobDetailResource.getJobStatus();
jobDetails.setJobStatus(getJobStatus(jobStatus));
StatusResource applicationStatus = jobDetailResource.getApplicationStatus();
jobDetails.setApplicationStatus(getApplicationStatus(applicationStatus));
List<ErrorDetailResource> errorDetails = jobDetailResource.getErrorDetails();
jobDetails.setErrors(getErrorDetailList(errorDetails));
jobDetails.setComputeResourceConsumed(jobDetailResource.getComputeResourceConsumed());
return jobDetails;