< Summary

Class:Azure.ResourceManager.Resources.Models.ErrorResponseAutoGenerated
Assembly:Azure.ResourceManager.Resources
File(s):C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\ErrorResponseAutoGenerated.cs
C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\ErrorResponseAutoGenerated.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_HttpStatus()-0%100%
get_ErrorCode()-0%100%
get_ErrorMessage()-0%100%
DeserializeErrorResponseAutoGenerated(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\ErrorResponseAutoGenerated.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.Resources.Models
 9{
 10    /// <summary> Error response indicates managed application is not able to process the incoming request. The reason i
 11    internal partial class ErrorResponseAutoGenerated
 12    {
 13        /// <summary> Initializes a new instance of ErrorResponseAutoGenerated. </summary>
 014        internal ErrorResponseAutoGenerated()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of ErrorResponseAutoGenerated. </summary>
 19        /// <param name="httpStatus"> Http status code. </param>
 20        /// <param name="errorCode"> Error code. </param>
 21        /// <param name="errorMessage"> Error message indicating why the operation failed. </param>
 022        internal ErrorResponseAutoGenerated(string httpStatus, string errorCode, string errorMessage)
 23        {
 024            HttpStatus = httpStatus;
 025            ErrorCode = errorCode;
 026            ErrorMessage = errorMessage;
 027        }
 28
 29        /// <summary> Http status code. </summary>
 030        public string HttpStatus { get; }
 31        /// <summary> Error code. </summary>
 032        public string ErrorCode { get; }
 33        /// <summary> Error message indicating why the operation failed. </summary>
 034        public string ErrorMessage { get; }
 35    }
 36}

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\ErrorResponseAutoGenerated.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.Resources.Models
 12{
 13    internal partial class ErrorResponseAutoGenerated
 14    {
 15        internal static ErrorResponseAutoGenerated DeserializeErrorResponseAutoGenerated(JsonElement element)
 16        {
 017            string httpStatus = default;
 018            string errorCode = default;
 019            string errorMessage = default;
 020            foreach (var property in element.EnumerateObject())
 21            {
 022                if (property.NameEquals("httpStatus"))
 23                {
 024                    if (property.Value.ValueKind == JsonValueKind.Null)
 25                    {
 26                        continue;
 27                    }
 028                    httpStatus = property.Value.GetString();
 029                    continue;
 30                }
 031                if (property.NameEquals("errorCode"))
 32                {
 033                    if (property.Value.ValueKind == JsonValueKind.Null)
 34                    {
 35                        continue;
 36                    }
 037                    errorCode = property.Value.GetString();
 038                    continue;
 39                }
 040                if (property.NameEquals("errorMessage"))
 41                {
 042                    if (property.Value.ValueKind == JsonValueKind.Null)
 43                    {
 44                        continue;
 45                    }
 046                    errorMessage = property.Value.GetString();
 47                    continue;
 48                }
 49            }
 050            return new ErrorResponseAutoGenerated(httpStatus, errorCode, errorMessage);
 51        }
 52    }
 53}