// <auto-generated>
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>

namespace Microsoft.Azure.Management.Compute.Models
{
    using Newtonsoft.Json;
    using System.Collections;
    using System.Collections.Generic;
    using System.Linq;

    /// <summary>
    /// The result summary of an installation operation.
    /// </summary>
    public partial class VirtualMachineInstallPatchesResult
    {
        /// <summary>
        /// Initializes a new instance of the
        /// VirtualMachineInstallPatchesResult class.
        /// </summary>
        public VirtualMachineInstallPatchesResult()
        {
            CustomInit();
        }

        /// <summary>
        /// Initializes a new instance of the
        /// VirtualMachineInstallPatchesResult class.
        /// </summary>
        /// <param name="status">The overall success or failure status of the
        /// operation. It remains "InProgress" until the operation completes.
        /// At that point it will become "Failed", "Succeeded", "Unknown" or
        /// "CompletedWithWarnings.". Possible values include: 'Unknown',
        /// 'InProgress', 'Failed', 'Succeeded',
        /// 'CompletedWithWarnings'</param>
        /// <param name="installationActivityId">The activity ID of the
        /// operation that produced this result. It is used to correlate across
        /// CRP and extension logs.</param>
        /// <param name="rebootStatus">The reboot state of the VM following
        /// completion of the operation. Possible values include: 'Unknown',
        /// 'NotNeeded', 'Required', 'Started', 'Failed', 'Completed'</param>
        /// <param name="maintenanceWindowExceeded">Whether the operation ran
        /// out of time before it completed all its intended actions.</param>
        /// <param name="excludedPatchCount">The number of patches that were
        /// not installed due to the user blocking their installation.</param>
        /// <param name="notSelectedPatchCount">The number of patches that were
        /// detected as available for install, but did not meet the operation's
        /// criteria.</param>
        /// <param name="pendingPatchCount">The number of patches that were
        /// identified as meeting the installation criteria, but were not able
        /// to be installed. Typically this happens when
        /// maintenanceWindowExceeded == true.</param>
        /// <param name="installedPatchCount">The number of patches
        /// successfully installed.</param>
        /// <param name="failedPatchCount">The number of patches that could not
        /// be installed due to some issue. See errors for details.</param>
        /// <param name="patches">The patches that were installed during the
        /// operation.</param>
        /// <param name="startDateTime">The UTC timestamp when the operation
        /// began.</param>
        /// <param name="error">The errors that were encountered during
        /// execution of the operation. The details array contains the list of
        /// them.</param>
        public VirtualMachineInstallPatchesResult(string status = default(string), string installationActivityId = default(string), string rebootStatus = default(string), bool? maintenanceWindowExceeded = default(bool?), int? excludedPatchCount = default(int?), int? notSelectedPatchCount = default(int?), int? pendingPatchCount = default(int?), int? installedPatchCount = default(int?), int? failedPatchCount = default(int?), IList<PatchInstallationDetail> patches = default(IList<PatchInstallationDetail>), System.DateTime? startDateTime = default(System.DateTime?), ApiError error = default(ApiError))
        {
            Status = status;
            InstallationActivityId = installationActivityId;
            RebootStatus = rebootStatus;
            MaintenanceWindowExceeded = maintenanceWindowExceeded;
            ExcludedPatchCount = excludedPatchCount;
            NotSelectedPatchCount = notSelectedPatchCount;
            PendingPatchCount = pendingPatchCount;
            InstalledPatchCount = installedPatchCount;
            FailedPatchCount = failedPatchCount;
            Patches = patches;
            StartDateTime = startDateTime;
            Error = error;
            CustomInit();
        }

        /// <summary>
        /// An initialization method that performs custom operations like setting defaults
        /// </summary>
        partial void CustomInit();

        /// <summary>
        /// Gets the overall success or failure status of the operation. It
        /// remains "InProgress" until the operation completes. At that point
        /// it will become "Failed", "Succeeded", "Unknown" or
        /// "CompletedWithWarnings.". Possible values include: 'Unknown',
        /// 'InProgress', 'Failed', 'Succeeded', 'CompletedWithWarnings'
        /// </summary>
        [JsonProperty(PropertyName = "status")]
        public string Status { get; private set; }

        /// <summary>
        /// Gets the activity ID of the operation that produced this result. It
        /// is used to correlate across CRP and extension logs.
        /// </summary>
        [JsonProperty(PropertyName = "installationActivityId")]
        public string InstallationActivityId { get; private set; }

        /// <summary>
        /// Gets the reboot state of the VM following completion of the
        /// operation. Possible values include: 'Unknown', 'NotNeeded',
        /// 'Required', 'Started', 'Failed', 'Completed'
        /// </summary>
        [JsonProperty(PropertyName = "rebootStatus")]
        public string RebootStatus { get; private set; }

        /// <summary>
        /// Gets whether the operation ran out of time before it completed all
        /// its intended actions.
        /// </summary>
        [JsonProperty(PropertyName = "maintenanceWindowExceeded")]
        public bool? MaintenanceWindowExceeded { get; private set; }

        /// <summary>
        /// Gets the number of patches that were not installed due to the user
        /// blocking their installation.
        /// </summary>
        [JsonProperty(PropertyName = "excludedPatchCount")]
        public int? ExcludedPatchCount { get; private set; }

        /// <summary>
        /// Gets the number of patches that were detected as available for
        /// install, but did not meet the operation's criteria.
        /// </summary>
        [JsonProperty(PropertyName = "notSelectedPatchCount")]
        public int? NotSelectedPatchCount { get; private set; }

        /// <summary>
        /// Gets the number of patches that were identified as meeting the
        /// installation criteria, but were not able to be installed. Typically
        /// this happens when maintenanceWindowExceeded == true.
        /// </summary>
        [JsonProperty(PropertyName = "pendingPatchCount")]
        public int? PendingPatchCount { get; private set; }

        /// <summary>
        /// Gets the number of patches successfully installed.
        /// </summary>
        [JsonProperty(PropertyName = "installedPatchCount")]
        public int? InstalledPatchCount { get; private set; }

        /// <summary>
        /// Gets the number of patches that could not be installed due to some
        /// issue. See errors for details.
        /// </summary>
        [JsonProperty(PropertyName = "failedPatchCount")]
        public int? FailedPatchCount { get; private set; }

        /// <summary>
        /// Gets the patches that were installed during the operation.
        /// </summary>
        [JsonProperty(PropertyName = "patches")]
        public IList<PatchInstallationDetail> Patches { get; private set; }

        /// <summary>
        /// Gets the UTC timestamp when the operation began.
        /// </summary>
        [JsonProperty(PropertyName = "startDateTime")]
        public System.DateTime? StartDateTime { get; private set; }

        /// <summary>
        /// Gets the errors that were encountered during execution of the
        /// operation. The details array contains the list of them.
        /// </summary>
        [JsonProperty(PropertyName = "error")]
        public ApiError Error { get; private set; }

    }
}
