< Summary

Class:Azure.Messaging.EventGrid.SystemEvents.ResourceActionFailureData
Assembly:Azure.Messaging.EventGrid
File(s):C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\ResourceActionFailureData.cs
C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\ResourceActionFailureData.Serialization.cs
Covered lines:57
Uncovered lines:14
Coverable lines:71
Total lines:157
Line coverage:80.2% (57 of 71)
Covered branches:23
Total branches:24
Branch coverage:95.8% (23 of 24)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_TenantId()-100%100%
get_SubscriptionId()-0%100%
get_ResourceGroup()-0%100%
get_ResourceProvider()-0%100%
get_ResourceUri()-0%100%
get_OperationName()-0%100%
get_Status()-0%100%
get_Authorization()-0%100%
get_Claims()-0%100%
get_CorrelationId()-0%100%
get_HttpRequest()-0%100%
DeserializeResourceActionFailureData(...)-95.56%95.83%

File(s)

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\ResourceActionFailureData.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.Messaging.EventGrid.SystemEvents
 9{
 10    /// <summary> Schema of the Data property of an EventGridEvent for a Microsoft.Resources.ResourceActionFailure event
 11    public partial class ResourceActionFailureData
 12    {
 13        /// <summary> Initializes a new instance of ResourceActionFailureData. </summary>
 014        internal ResourceActionFailureData()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of ResourceActionFailureData. </summary>
 19        /// <param name="tenantId"> The tenant ID of the resource. </param>
 20        /// <param name="subscriptionId"> The subscription ID of the resource. </param>
 21        /// <param name="resourceGroup"> The resource group of the resource. </param>
 22        /// <param name="resourceProvider"> The resource provider performing the operation. </param>
 23        /// <param name="resourceUri"> The URI of the resource in the operation. </param>
 24        /// <param name="operationName"> The operation that was performed. </param>
 25        /// <param name="status"> The status of the operation. </param>
 26        /// <param name="authorization"> The requested authorization for the operation. </param>
 27        /// <param name="claims"> The properties of the claims. </param>
 28        /// <param name="correlationId"> An operation ID used for troubleshooting. </param>
 29        /// <param name="httpRequest"> The details of the operation. </param>
 230        internal ResourceActionFailureData(string tenantId, string subscriptionId, string resourceGroup, string resource
 31        {
 232            TenantId = tenantId;
 233            SubscriptionId = subscriptionId;
 234            ResourceGroup = resourceGroup;
 235            ResourceProvider = resourceProvider;
 236            ResourceUri = resourceUri;
 237            OperationName = operationName;
 238            Status = status;
 239            Authorization = authorization;
 240            Claims = claims;
 241            CorrelationId = correlationId;
 242            HttpRequest = httpRequest;
 243        }
 44
 45        /// <summary> The tenant ID of the resource. </summary>
 246        public string TenantId { get; }
 47        /// <summary> The subscription ID of the resource. </summary>
 048        public string SubscriptionId { get; }
 49        /// <summary> The resource group of the resource. </summary>
 050        public string ResourceGroup { get; }
 51        /// <summary> The resource provider performing the operation. </summary>
 052        public string ResourceProvider { get; }
 53        /// <summary> The URI of the resource in the operation. </summary>
 054        public string ResourceUri { get; }
 55        /// <summary> The operation that was performed. </summary>
 056        public string OperationName { get; }
 57        /// <summary> The status of the operation. </summary>
 058        public string Status { get; }
 59        /// <summary> The requested authorization for the operation. </summary>
 060        public string Authorization { get; }
 61        /// <summary> The properties of the claims. </summary>
 062        public string Claims { get; }
 63        /// <summary> An operation ID used for troubleshooting. </summary>
 064        public string CorrelationId { get; }
 65        /// <summary> The details of the operation. </summary>
 066        public string HttpRequest { get; }
 67    }
 68}

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\ResourceActionFailureData.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.Messaging.EventGrid.SystemEvents
 12{
 13    public partial class ResourceActionFailureData
 14    {
 15        internal static ResourceActionFailureData DeserializeResourceActionFailureData(JsonElement element)
 16        {
 217            Optional<string> tenantId = default;
 218            Optional<string> subscriptionId = default;
 219            Optional<string> resourceGroup = default;
 220            Optional<string> resourceProvider = default;
 221            Optional<string> resourceUri = default;
 222            Optional<string> operationName = default;
 223            Optional<string> status = default;
 224            Optional<string> authorization = default;
 225            Optional<string> claims = default;
 226            Optional<string> correlationId = default;
 227            Optional<string> httpRequest = default;
 4428            foreach (var property in element.EnumerateObject())
 29            {
 2030                if (property.NameEquals("tenantId"))
 31                {
 232                    tenantId = property.Value.GetString();
 233                    continue;
 34                }
 1835                if (property.NameEquals("subscriptionId"))
 36                {
 237                    subscriptionId = property.Value.GetString();
 238                    continue;
 39                }
 1640                if (property.NameEquals("resourceGroup"))
 41                {
 042                    resourceGroup = property.Value.GetString();
 043                    continue;
 44                }
 1645                if (property.NameEquals("resourceProvider"))
 46                {
 247                    resourceProvider = property.Value.GetString();
 248                    continue;
 49                }
 1450                if (property.NameEquals("resourceUri"))
 51                {
 252                    resourceUri = property.Value.GetString();
 253                    continue;
 54                }
 1255                if (property.NameEquals("operationName"))
 56                {
 257                    operationName = property.Value.GetString();
 258                    continue;
 59                }
 1060                if (property.NameEquals("status"))
 61                {
 262                    status = property.Value.GetString();
 263                    continue;
 64                }
 865                if (property.NameEquals("authorization"))
 66                {
 267                    authorization = property.Value.GetString();
 268                    continue;
 69                }
 670                if (property.NameEquals("claims"))
 71                {
 272                    claims = property.Value.GetString();
 273                    continue;
 74                }
 475                if (property.NameEquals("correlationId"))
 76                {
 277                    correlationId = property.Value.GetString();
 278                    continue;
 79                }
 280                if (property.NameEquals("httpRequest"))
 81                {
 282                    httpRequest = property.Value.GetString();
 83                    continue;
 84                }
 85            }
 286            return new ResourceActionFailureData(tenantId.Value, subscriptionId.Value, resourceGroup.Value, resourceProv
 87        }
 88    }
 89}