< Summary

Class:Azure.Messaging.EventGrid.SystemEvents.AppConfigurationKeyValueDeletedEventData
Assembly:Azure.Messaging.EventGrid
File(s):C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\AppConfigurationKeyValueDeletedEventData.cs
C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\AppConfigurationKeyValueDeletedEventData.Serialization.cs
Covered lines:19
Uncovered lines:4
Coverable lines:23
Total lines:77
Line coverage:82.6% (19 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_Key()-100%100%
get_Label()-0%100%
get_Etag()-0%100%
DeserializeAppConfigurationKeyValueDeletedEventData(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\AppConfigurationKeyValueDeletedEventData.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 an Microsoft.AppConfiguration.KeyValueDeleted eve
 11    public partial class AppConfigurationKeyValueDeletedEventData
 12    {
 13        /// <summary> Initializes a new instance of AppConfigurationKeyValueDeletedEventData. </summary>
 014        internal AppConfigurationKeyValueDeletedEventData()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of AppConfigurationKeyValueDeletedEventData. </summary>
 19        /// <param name="key"> The key used to identify the key-value that was deleted. </param>
 20        /// <param name="label"> The label, if any, used to identify the key-value that was deleted. </param>
 21        /// <param name="etag"> The etag representing the key-value that was deleted. </param>
 222        internal AppConfigurationKeyValueDeletedEventData(string key, string label, string etag)
 23        {
 224            Key = key;
 225            Label = label;
 226            Etag = etag;
 227        }
 28
 29        /// <summary> The key used to identify the key-value that was deleted. </summary>
 230        public string Key { get; }
 31        /// <summary> The label, if any, used to identify the key-value that was deleted. </summary>
 032        public string Label { get; }
 33        /// <summary> The etag representing the key-value that was deleted. </summary>
 034        public string Etag { get; }
 35    }
 36}

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