< Summary

Class:Azure.ResourceManager.Storage.Models.CloudErrorBodyAutoGenerated2
Assembly:Azure.ResourceManager.Storage
File(s):C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\CloudErrorBodyAutoGenerated2.cs
C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\CloudErrorBodyAutoGenerated2.Serialization.cs
Covered lines:0
Uncovered lines:38
Coverable lines:38
Total lines:118
Line coverage:0% (0 of 38)
Covered branches:0
Total branches:22
Branch coverage:0% (0 of 22)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Code()-0%100%
get_Message()-0%100%
get_Target()-0%100%
get_Details()-0%100%
DeserializeCloudErrorBodyAutoGenerated2(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\CloudErrorBodyAutoGenerated2.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.Collections.Generic;
 9
 10namespace Azure.ResourceManager.Storage.Models
 11{
 12    /// <summary> An error response from the Storage service. </summary>
 13    internal partial class CloudErrorBodyAutoGenerated2
 14    {
 15        /// <summary> Initializes a new instance of CloudErrorBodyAutoGenerated2. </summary>
 016        internal CloudErrorBodyAutoGenerated2()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of CloudErrorBodyAutoGenerated2. </summary>
 21        /// <param name="code"> An identifier for the error. Codes are invariant and are intended to be consumed program
 22        /// <param name="message"> A message describing the error, intended to be suitable for display in a user interfa
 23        /// <param name="target"> The target of the particular error. For example, the name of the property in error. </
 24        /// <param name="details"> A list of additional details about the error. </param>
 025        internal CloudErrorBodyAutoGenerated2(string code, string message, string target, IReadOnlyList<CloudErrorBodyAu
 26        {
 027            Code = code;
 028            Message = message;
 029            Target = target;
 030            Details = details;
 031        }
 32
 33        /// <summary> An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
 034        public string Code { get; }
 35        /// <summary> A message describing the error, intended to be suitable for display in a user interface. </summary
 036        public string Message { get; }
 37        /// <summary> The target of the particular error. For example, the name of the property in error. </summary>
 038        public string Target { get; }
 39        /// <summary> A list of additional details about the error. </summary>
 040        public IReadOnlyList<CloudErrorBodyAutoGenerated2> Details { get; }
 41    }
 42}

C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\CloudErrorBodyAutoGenerated2.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.Collections.Generic;
 9using System.Text.Json;
 10using Azure.Core;
 11
 12namespace Azure.ResourceManager.Storage.Models
 13{
 14    internal partial class CloudErrorBodyAutoGenerated2
 15    {
 16        internal static CloudErrorBodyAutoGenerated2 DeserializeCloudErrorBodyAutoGenerated2(JsonElement element)
 17        {
 018            string code = default;
 019            string message = default;
 020            string target = default;
 021            IReadOnlyList<CloudErrorBodyAutoGenerated2> details = default;
 022            foreach (var property in element.EnumerateObject())
 23            {
 024                if (property.NameEquals("code"))
 25                {
 026                    if (property.Value.ValueKind == JsonValueKind.Null)
 27                    {
 28                        continue;
 29                    }
 030                    code = property.Value.GetString();
 031                    continue;
 32                }
 033                if (property.NameEquals("message"))
 34                {
 035                    if (property.Value.ValueKind == JsonValueKind.Null)
 36                    {
 37                        continue;
 38                    }
 039                    message = property.Value.GetString();
 040                    continue;
 41                }
 042                if (property.NameEquals("target"))
 43                {
 044                    if (property.Value.ValueKind == JsonValueKind.Null)
 45                    {
 46                        continue;
 47                    }
 048                    target = property.Value.GetString();
 049                    continue;
 50                }
 051                if (property.NameEquals("details"))
 52                {
 053                    if (property.Value.ValueKind == JsonValueKind.Null)
 54                    {
 55                        continue;
 56                    }
 057                    List<CloudErrorBodyAutoGenerated2> array = new List<CloudErrorBodyAutoGenerated2>();
 058                    foreach (var item in property.Value.EnumerateArray())
 59                    {
 060                        if (item.ValueKind == JsonValueKind.Null)
 61                        {
 062                            array.Add(null);
 63                        }
 64                        else
 65                        {
 066                            array.Add(DeserializeCloudErrorBodyAutoGenerated2(item));
 67                        }
 68                    }
 069                    details = array;
 70                    continue;
 71                }
 72            }
 073            return new CloudErrorBodyAutoGenerated2(code, message, target, details);
 74        }
 75    }
 76}