/// <summary>
        /// Initializes a new instance of the ApplicationContainerDetails class.
        /// </summary>
        /// <param name="containerResult">
        /// Result of a REST call, containing details about a container.
        /// </param>
        /// <param name="parentApplicationAttempt">
        /// The parent ApplicationAttemptDetails object to which the container is associated.
        /// </param>
        internal ApplicationContainerDetails(ApplicationContainerGetResult containerResult, ApplicationAttemptDetails parentApplicationAttempt)
        {
            if (containerResult == null)
            {
                throw new ArgumentNullException("containerResult");
            }

            if (parentApplicationAttempt == null)
            {
                throw new ArgumentNullException("parentApplicationAttempt");
            }

            this.ContainerId = containerResult.ContainerId;
            this.NodeId = containerResult.NodeId;
            this.State = containerResult.State;
            this.ExitStatus = containerResult.ExitStatus;
            this.Priority = containerResult.Priority;
            this.DiagnosticInfo = containerResult.DiagnosticInfo;
            this.AllocatedCores = containerResult.AllocatedCores;
            this.AllocatedMemoryInMegabytes = containerResult.AllocatedMemoryInMegabytes;
            this.StartTimeInUtc = Constants.UnixEpoch.AddMilliseconds(containerResult.StartTimeInMillisecondsSinceUnixEpoch);
            this.FinishTimeInUtc = Constants.UnixEpoch.AddMilliseconds(containerResult.FinishTimeInMillisecondsSinceUnixEpoch);

            this.ParentApplicationAttempt = parentApplicationAttempt;
        }
        /// <summary>
        /// Initializes a new instance of the ApplicationContainerDetails class.
        /// </summary>
        /// <param name="containerResult">
        /// Result of a REST call, containing details about a container.
        /// </param>
        /// <param name="parentApplicationAttempt">
        /// The parent ApplicationAttemptDetails object to which the container is associated.
        /// </param>
        internal ApplicationContainerDetails(ApplicationContainerGetResult containerResult, ApplicationAttemptDetails parentApplicationAttempt)
        {
            if (containerResult == null)
            {
                throw new ArgumentNullException("containerResult");
            }

            if (parentApplicationAttempt == null)
            {
                throw new ArgumentNullException("parentApplicationAttempt");
            }

            this.ContainerId                = containerResult.ContainerId;
            this.NodeId                     = containerResult.NodeId;
            this.State                      = containerResult.State;
            this.ExitStatus                 = containerResult.ExitStatus;
            this.Priority                   = containerResult.Priority;
            this.DiagnosticInfo             = containerResult.DiagnosticInfo;
            this.AllocatedCores             = containerResult.AllocatedCores;
            this.AllocatedMemoryInMegabytes = containerResult.AllocatedMemoryInMegabytes;
            this.StartTimeInUtc             = Constants.UnixEpoch.AddMilliseconds(containerResult.StartTimeInMillisecondsSinceUnixEpoch);
            this.FinishTimeInUtc            = Constants.UnixEpoch.AddMilliseconds(containerResult.FinishTimeInMillisecondsSinceUnixEpoch);

            this.ParentApplicationAttempt = parentApplicationAttempt;
        }