/// <summary>
 /// Initializes a new instance of the AzureHDInsightJob class.
 /// </summary>
 /// <param name="jobDetails">The HDInsight jobDetails.</param>
 /// <param name="cluster">The cluster that the jobDetails was created against.</param>
 public AzureHDInsightJob(JobDetailRootJsonObject jobDetails, string cluster)
 {
     Cluster = cluster.Substring(0, cluster.IndexOf('.') + 1);
     HttpEndpoint = cluster;
     State = jobDetails.Status.State;
     JobId = jobDetails.Id;
     ParentId = jobDetails.ParentId;
     PercentComplete = jobDetails.PercentComplete;
     ExitValue = jobDetails.ExitValue;
     User = jobDetails.User;
     Callback = jobDetails.Callback;
     Completed = jobDetails.Completed;
 }
 /// <summary>
 /// Initializes a new instance of the AzureHDInsightJob class.
 /// </summary>
 /// <param name="jobDetails">The HDInsight jobDetails.</param>
 /// <param name="cluster">The cluster that the jobDetails was created against.</param>
 public AzureHDInsightJob(JobDetailRootJsonObject jobDetails, string cluster)
 {
     var index = cluster.IndexOf('.');
     Cluster = index > -1 ? cluster.Substring(0, index) : cluster;
     HttpEndpoint = cluster;
     State = jobDetails.Status.State;
     JobId = jobDetails.Id;
     ParentId = jobDetails.ParentId;
     PercentComplete = jobDetails.PercentComplete;
     ExitValue = jobDetails.ExitValue;
     User = jobDetails.User;
     Callback = jobDetails.Callback;
     Completed = jobDetails.Completed;
     StatusFolder = jobDetails.Userargs.Statusdir != null ? jobDetails.Userargs.Statusdir.ToString() : string.Empty;
 }