< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_SuccessfullyRolledbackInstanceCount()-0%100%
get_FailedRolledbackInstanceCount()-0%100%
get_RollbackError()-0%100%
DeserializeRollbackStatusInfo(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\RollbackStatusInfo.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> Information about rollback on failed VM instances after a OS Upgrade operation. </summary>
 11    public partial class RollbackStatusInfo
 12    {
 13        /// <summary> Initializes a new instance of RollbackStatusInfo. </summary>
 014        internal RollbackStatusInfo()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of RollbackStatusInfo. </summary>
 19        /// <param name="successfullyRolledbackInstanceCount"> The number of instances which have been successfully roll
 20        /// <param name="failedRolledbackInstanceCount"> The number of instances which failed to rollback. </param>
 21        /// <param name="rollbackError"> Error details if OS rollback failed. </param>
 022        internal RollbackStatusInfo(int? successfullyRolledbackInstanceCount, int? failedRolledbackInstanceCount, ApiErr
 23        {
 024            SuccessfullyRolledbackInstanceCount = successfullyRolledbackInstanceCount;
 025            FailedRolledbackInstanceCount = failedRolledbackInstanceCount;
 026            RollbackError = rollbackError;
 027        }
 28
 29        /// <summary> The number of instances which have been successfully rolled back. </summary>
 030        public int? SuccessfullyRolledbackInstanceCount { get; }
 31        /// <summary> The number of instances which failed to rollback. </summary>
 032        public int? FailedRolledbackInstanceCount { get; }
 33        /// <summary> Error details if OS rollback failed. </summary>
 034        public ApiError RollbackError { get; }
 35    }
 36}

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\RollbackStatusInfo.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 RollbackStatusInfo
 14    {
 15        internal static RollbackStatusInfo DeserializeRollbackStatusInfo(JsonElement element)
 16        {
 017            int? successfullyRolledbackInstanceCount = default;
 018            int? failedRolledbackInstanceCount = default;
 019            ApiError rollbackError = default;
 020            foreach (var property in element.EnumerateObject())
 21            {
 022                if (property.NameEquals("successfullyRolledbackInstanceCount"))
 23                {
 024                    if (property.Value.ValueKind == JsonValueKind.Null)
 25                    {
 26                        continue;
 27                    }
 028                    successfullyRolledbackInstanceCount = property.Value.GetInt32();
 029                    continue;
 30                }
 031                if (property.NameEquals("failedRolledbackInstanceCount"))
 32                {
 033                    if (property.Value.ValueKind == JsonValueKind.Null)
 34                    {
 35                        continue;
 36                    }
 037                    failedRolledbackInstanceCount = property.Value.GetInt32();
 038                    continue;
 39                }
 040                if (property.NameEquals("rollbackError"))
 41                {
 042                    if (property.Value.ValueKind == JsonValueKind.Null)
 43                    {
 44                        continue;
 45                    }
 046                    rollbackError = ApiError.DeserializeApiError(property.Value);
 47                    continue;
 48                }
 49            }
 050            return new RollbackStatusInfo(successfullyRolledbackInstanceCount, failedRolledbackInstanceCount, rollbackEr
 51        }
 52    }
 53}