< Summary

Class:Azure.Messaging.EventGrid.SystemEvents.AppServicePlanEventTypeDetail
Assembly:Azure.Messaging.EventGrid
File(s):C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\AppServicePlanEventTypeDetail.cs
C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\AppServicePlanEventTypeDetail.Serialization.cs
Covered lines:18
Uncovered lines:5
Coverable lines:23
Total lines:77
Line coverage:78.2% (18 of 23)
Covered branches:8
Total branches:8
Branch coverage:100% (8 of 8)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_StampKind()-0%100%
get_Action()-0%100%
get_Status()-0%100%
DeserializeAppServicePlanEventTypeDetail(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\AppServicePlanEventTypeDetail.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> Detail of action on the app service plan. </summary>
 11    public partial class AppServicePlanEventTypeDetail
 12    {
 13        /// <summary> Initializes a new instance of AppServicePlanEventTypeDetail. </summary>
 014        internal AppServicePlanEventTypeDetail()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of AppServicePlanEventTypeDetail. </summary>
 19        /// <param name="stampKind"> Kind of environment where app service plan is. </param>
 20        /// <param name="action"> Type of action on the app service plan. </param>
 21        /// <param name="status"> Asynchronous operation status of the operation on the app service plan. </param>
 222        internal AppServicePlanEventTypeDetail(StampKind? stampKind, AppServicePlanAction? action, AsyncStatus? status)
 23        {
 224            StampKind = stampKind;
 225            Action = action;
 226            Status = status;
 227        }
 28
 29        /// <summary> Kind of environment where app service plan is. </summary>
 030        public StampKind? StampKind { get; }
 31        /// <summary> Type of action on the app service plan. </summary>
 032        public AppServicePlanAction? Action { get; }
 33        /// <summary> Asynchronous operation status of the operation on the app service plan. </summary>
 034        public AsyncStatus? Status { get; }
 35    }
 36}

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\AppServicePlanEventTypeDetail.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 AppServicePlanEventTypeDetail
 14    {
 15        internal static AppServicePlanEventTypeDetail DeserializeAppServicePlanEventTypeDetail(JsonElement element)
 16        {
 217            Optional<StampKind> stampKind = default;
 218            Optional<AppServicePlanAction> action = default;
 219            Optional<AsyncStatus> status = default;
 1620            foreach (var property in element.EnumerateObject())
 21            {
 622                if (property.NameEquals("stampKind"))
 23                {
 224                    stampKind = new StampKind(property.Value.GetString());
 225                    continue;
 26                }
 427                if (property.NameEquals("action"))
 28                {
 229                    action = new AppServicePlanAction(property.Value.GetString());
 230                    continue;
 31                }
 232                if (property.NameEquals("status"))
 33                {
 234                    status = new AsyncStatus(property.Value.GetString());
 35                    continue;
 36                }
 37            }
 238            return new AppServicePlanEventTypeDetail(Optional.ToNullable(stampKind), Optional.ToNullable(action), Option
 39        }
 40    }
 41}