< Summary

Class:Azure.ResourceManager.Storage.Models.BlobRestoreStatus
Assembly:Azure.ResourceManager.Storage
File(s):C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\BlobRestoreStatus.cs
C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\BlobRestoreStatus.Serialization.cs
Covered lines:0
Uncovered lines:48
Coverable lines:48
Total lines:129
Line coverage:0% (0 of 48)
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_Status()-0%100%
get_FailureReason()-0%100%
get_RestoreId()-0%100%
get_Parameters()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeBlobRestoreStatus(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\BlobRestoreStatus.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.Storage.Models
 9{
 10    /// <summary> Blob restore status. </summary>
 11    public partial class BlobRestoreStatus
 12    {
 13        /// <summary> Initializes a new instance of BlobRestoreStatus. </summary>
 014        public BlobRestoreStatus()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of BlobRestoreStatus. </summary>
 19        /// <param name="status"> The status of blob restore progress. Possible values are: - InProgress: Indicates that
 20        /// <param name="failureReason"> Failure reason when blob restore is failed. </param>
 21        /// <param name="restoreId"> Id for tracking blob restore request. </param>
 22        /// <param name="parameters"> Blob restore request parameters. </param>
 023        internal BlobRestoreStatus(BlobRestoreProgressStatus? status, string failureReason, string restoreId, BlobRestor
 24        {
 025            Status = status;
 026            FailureReason = failureReason;
 027            RestoreId = restoreId;
 028            Parameters = parameters;
 029        }
 30
 31        /// <summary> The status of blob restore progress. Possible values are: - InProgress: Indicates that blob restor
 032        public BlobRestoreProgressStatus? Status { get; }
 33        /// <summary> Failure reason when blob restore is failed. </summary>
 034        public string FailureReason { get; }
 35        /// <summary> Id for tracking blob restore request. </summary>
 036        public string RestoreId { get; }
 37        /// <summary> Blob restore request parameters. </summary>
 038        public BlobRestoreParameters Parameters { get; }
 39    }
 40}

C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\BlobRestoreStatus.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.Storage.Models
 12{
 13    public partial class BlobRestoreStatus : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            if (Status != null)
 19            {
 020                writer.WritePropertyName("status");
 021                writer.WriteStringValue(Status.Value.ToString());
 22            }
 023            if (FailureReason != null)
 24            {
 025                writer.WritePropertyName("failureReason");
 026                writer.WriteStringValue(FailureReason);
 27            }
 028            if (RestoreId != null)
 29            {
 030                writer.WritePropertyName("restoreId");
 031                writer.WriteStringValue(RestoreId);
 32            }
 033            if (Parameters != null)
 34            {
 035                writer.WritePropertyName("parameters");
 036                writer.WriteObjectValue(Parameters);
 37            }
 038            writer.WriteEndObject();
 039        }
 40
 41        internal static BlobRestoreStatus DeserializeBlobRestoreStatus(JsonElement element)
 42        {
 043            BlobRestoreProgressStatus? status = default;
 044            string failureReason = default;
 045            string restoreId = default;
 046            BlobRestoreParameters parameters = default;
 047            foreach (var property in element.EnumerateObject())
 48            {
 049                if (property.NameEquals("status"))
 50                {
 051                    if (property.Value.ValueKind == JsonValueKind.Null)
 52                    {
 53                        continue;
 54                    }
 055                    status = new BlobRestoreProgressStatus(property.Value.GetString());
 056                    continue;
 57                }
 058                if (property.NameEquals("failureReason"))
 59                {
 060                    if (property.Value.ValueKind == JsonValueKind.Null)
 61                    {
 62                        continue;
 63                    }
 064                    failureReason = property.Value.GetString();
 065                    continue;
 66                }
 067                if (property.NameEquals("restoreId"))
 68                {
 069                    if (property.Value.ValueKind == JsonValueKind.Null)
 70                    {
 71                        continue;
 72                    }
 073                    restoreId = property.Value.GetString();
 074                    continue;
 75                }
 076                if (property.NameEquals("parameters"))
 77                {
 078                    if (property.Value.ValueKind == JsonValueKind.Null)
 79                    {
 80                        continue;
 81                    }
 082                    parameters = BlobRestoreParameters.DeserializeBlobRestoreParameters(property.Value);
 83                    continue;
 84                }
 85            }
 086            return new BlobRestoreStatus(status, failureReason, restoreId, parameters);
 87        }
 88    }
 89}