< Summary

Class:Azure.ResourceManager.Compute.Models.UpgradeOperationHistoricalStatusInfoProperties
Assembly:Azure.ResourceManager.Compute
File(s):C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\UpgradeOperationHistoricalStatusInfoProperties.cs
C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\UpgradeOperationHistoricalStatusInfoProperties.Serialization.cs
Covered lines:0
Uncovered lines:47
Coverable lines:47
Total lines:131
Line coverage:0% (0 of 47)
Covered branches:0
Total branches:26
Branch coverage:0% (0 of 26)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_RunningStatus()-0%100%
get_Progress()-0%100%
get_Error()-0%100%
get_StartedBy()-0%100%
get_TargetImageReference()-0%100%
get_RollbackInfo()-0%100%
DeserializeUpgradeOperationHistoricalStatusInfoProperties(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\UpgradeOperationHistoricalStatusInfoProperties.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4// <auto-generated/>
 5
 6#nullable disable
 7
 8namespace Azure.ResourceManager.Compute.Models
 9{
 10    /// <summary> Describes each OS upgrade on the Virtual Machine Scale Set. </summary>
 11    public partial class UpgradeOperationHistoricalStatusInfoProperties
 12    {
 13        /// <summary> Initializes a new instance of UpgradeOperationHistoricalStatusInfoProperties. </summary>
 014        internal UpgradeOperationHistoricalStatusInfoProperties()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of UpgradeOperationHistoricalStatusInfoProperties. </summary>
 19        /// <param name="runningStatus"> Information about the overall status of the upgrade operation. </param>
 20        /// <param name="progress"> Counts of the VMs in each state. </param>
 21        /// <param name="error"> Error Details for this upgrade if there are any. </param>
 22        /// <param name="startedBy"> Invoker of the Upgrade Operation. </param>
 23        /// <param name="targetImageReference"> Image Reference details. </param>
 24        /// <param name="rollbackInfo"> Information about OS rollback if performed. </param>
 025        internal UpgradeOperationHistoricalStatusInfoProperties(UpgradeOperationHistoryStatus runningStatus, RollingUpgr
 26        {
 027            RunningStatus = runningStatus;
 028            Progress = progress;
 029            Error = error;
 030            StartedBy = startedBy;
 031            TargetImageReference = targetImageReference;
 032            RollbackInfo = rollbackInfo;
 033        }
 34
 35        /// <summary> Information about the overall status of the upgrade operation. </summary>
 036        public UpgradeOperationHistoryStatus RunningStatus { get; }
 37        /// <summary> Counts of the VMs in each state. </summary>
 038        public RollingUpgradeProgressInfo Progress { get; }
 39        /// <summary> Error Details for this upgrade if there are any. </summary>
 040        public ApiError Error { get; }
 41        /// <summary> Invoker of the Upgrade Operation. </summary>
 042        public UpgradeOperationInvoker? StartedBy { get; }
 43        /// <summary> Image Reference details. </summary>
 044        public ImageReference TargetImageReference { get; }
 45        /// <summary> Information about OS rollback if performed. </summary>
 046        public RollbackStatusInfo RollbackInfo { get; }
 47    }
 48}

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\UpgradeOperationHistoricalStatusInfoProperties.Serialization.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4// <auto-generated/>
 5
 6#nullable disable
 7
 8using System.Text.Json;
 9using Azure.Core;
 10
 11namespace Azure.ResourceManager.Compute.Models
 12{
 13    public partial class UpgradeOperationHistoricalStatusInfoProperties
 14    {
 15        internal static UpgradeOperationHistoricalStatusInfoProperties DeserializeUpgradeOperationHistoricalStatusInfoPr
 16        {
 017            UpgradeOperationHistoryStatus runningStatus = default;
 018            RollingUpgradeProgressInfo progress = default;
 019            ApiError error = default;
 020            UpgradeOperationInvoker? startedBy = default;
 021            ImageReference targetImageReference = default;
 022            RollbackStatusInfo rollbackInfo = default;
 023            foreach (var property in element.EnumerateObject())
 24            {
 025                if (property.NameEquals("runningStatus"))
 26                {
 027                    if (property.Value.ValueKind == JsonValueKind.Null)
 28                    {
 29                        continue;
 30                    }
 031                    runningStatus = UpgradeOperationHistoryStatus.DeserializeUpgradeOperationHistoryStatus(property.Valu
 032                    continue;
 33                }
 034                if (property.NameEquals("progress"))
 35                {
 036                    if (property.Value.ValueKind == JsonValueKind.Null)
 37                    {
 38                        continue;
 39                    }
 040                    progress = RollingUpgradeProgressInfo.DeserializeRollingUpgradeProgressInfo(property.Value);
 041                    continue;
 42                }
 043                if (property.NameEquals("error"))
 44                {
 045                    if (property.Value.ValueKind == JsonValueKind.Null)
 46                    {
 47                        continue;
 48                    }
 049                    error = ApiError.DeserializeApiError(property.Value);
 050                    continue;
 51                }
 052                if (property.NameEquals("startedBy"))
 53                {
 054                    if (property.Value.ValueKind == JsonValueKind.Null)
 55                    {
 56                        continue;
 57                    }
 058                    startedBy = property.Value.GetString().ToUpgradeOperationInvoker();
 059                    continue;
 60                }
 061                if (property.NameEquals("targetImageReference"))
 62                {
 063                    if (property.Value.ValueKind == JsonValueKind.Null)
 64                    {
 65                        continue;
 66                    }
 067                    targetImageReference = ImageReference.DeserializeImageReference(property.Value);
 068                    continue;
 69                }
 070                if (property.NameEquals("rollbackInfo"))
 71                {
 072                    if (property.Value.ValueKind == JsonValueKind.Null)
 73                    {
 74                        continue;
 75                    }
 076                    rollbackInfo = RollbackStatusInfo.DeserializeRollbackStatusInfo(property.Value);
 77                    continue;
 78                }
 79            }
 080            return new UpgradeOperationHistoricalStatusInfoProperties(runningStatus, progress, error, startedBy, targetI
 81        }
 82    }
 83}