< Summary

Class:Azure.Messaging.EventGrid.SystemEvents.StorageDirectoryDeletedEventData
Assembly:Azure.Messaging.EventGrid
File(s):C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\StorageDirectoryDeletedEventData.cs
C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\StorageDirectoryDeletedEventData.Serialization.cs
Covered lines:38
Uncovered lines:15
Coverable lines:53
Total lines:127
Line coverage:71.6% (38 of 53)
Covered branches:15
Total branches:18
Branch coverage:83.3% (15 of 18)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_Api()-0%100%
get_ClientRequestId()-0%100%
get_RequestId()-0%100%
get_Url()-100%100%
get_Recursive()-0%100%
get_Sequencer()-0%100%
get_Identity()-0%100%
get_StorageDiagnostics()-0%100%
DeserializeStorageDirectoryDeletedEventData(...)-81.82%83.33%

File(s)

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\StorageDirectoryDeletedEventData.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.Storage.DirectoryDeleted event. </su
 11    public partial class StorageDirectoryDeletedEventData
 12    {
 13        /// <summary> Initializes a new instance of StorageDirectoryDeletedEventData. </summary>
 014        internal StorageDirectoryDeletedEventData()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of StorageDirectoryDeletedEventData. </summary>
 19        /// <param name="api"> The name of the API/operation that triggered this event. </param>
 20        /// <param name="clientRequestId"> A request id provided by the client of the storage API operation that trigger
 21        /// <param name="requestId"> The request id generated by the storage service for the storage API operation that 
 22        /// <param name="url"> The path to the deleted directory. </param>
 23        /// <param name="recursive"> Is this event for a recursive delete operation. </param>
 24        /// <param name="sequencer"> An opaque string value representing the logical sequence of events for any particul
 25        /// <param name="identity"> The identity of the requester that triggered this event. </param>
 26        /// <param name="storageDiagnostics"> For service use only. Diagnostic data occasionally included by the Azure S
 227        internal StorageDirectoryDeletedEventData(string api, string clientRequestId, string requestId, string url, bool
 28        {
 229            Api = api;
 230            ClientRequestId = clientRequestId;
 231            RequestId = requestId;
 232            Url = url;
 233            Recursive = recursive;
 234            Sequencer = sequencer;
 235            Identity = identity;
 236            StorageDiagnostics = storageDiagnostics;
 237        }
 38
 39        /// <summary> The name of the API/operation that triggered this event. </summary>
 040        public string Api { get; }
 41        /// <summary> A request id provided by the client of the storage API operation that triggered this event. </summ
 042        public string ClientRequestId { get; }
 43        /// <summary> The request id generated by the storage service for the storage API operation that triggered this 
 044        public string RequestId { get; }
 45        /// <summary> The path to the deleted directory. </summary>
 246        public string Url { get; }
 47        /// <summary> Is this event for a recursive delete operation. </summary>
 048        public bool? Recursive { get; }
 49        /// <summary> An opaque string value representing the logical sequence of events for any particular directory na
 050        public string Sequencer { get; }
 51        /// <summary> The identity of the requester that triggered this event. </summary>
 052        public string Identity { get; }
 53        /// <summary> For service use only. Diagnostic data occasionally included by the Azure Storage service. This pro
 054        public object StorageDiagnostics { get; }
 55    }
 56}

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\StorageDirectoryDeletedEventData.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 StorageDirectoryDeletedEventData
 14    {
 15        internal static StorageDirectoryDeletedEventData DeserializeStorageDirectoryDeletedEventData(JsonElement element
 16        {
 217            Optional<string> api = default;
 218            Optional<string> clientRequestId = default;
 219            Optional<string> requestId = default;
 220            Optional<string> url = default;
 221            Optional<bool> recursive = default;
 222            Optional<string> sequencer = default;
 223            Optional<string> identity = default;
 224            Optional<object> storageDiagnostics = default;
 2425            foreach (var property in element.EnumerateObject())
 26            {
 1027                if (property.NameEquals("api"))
 28                {
 229                    api = property.Value.GetString();
 230                    continue;
 31                }
 832                if (property.NameEquals("clientRequestId"))
 33                {
 034                    clientRequestId = property.Value.GetString();
 035                    continue;
 36                }
 837                if (property.NameEquals("requestId"))
 38                {
 239                    requestId = property.Value.GetString();
 240                    continue;
 41                }
 642                if (property.NameEquals("url"))
 43                {
 244                    url = property.Value.GetString();
 245                    continue;
 46                }
 447                if (property.NameEquals("recursive"))
 48                {
 049                    recursive = property.Value.GetBoolean();
 050                    continue;
 51                }
 452                if (property.NameEquals("sequencer"))
 53                {
 254                    sequencer = property.Value.GetString();
 255                    continue;
 56                }
 257                if (property.NameEquals("identity"))
 58                {
 059                    identity = property.Value.GetString();
 060                    continue;
 61                }
 262                if (property.NameEquals("storageDiagnostics"))
 63                {
 264                    storageDiagnostics = property.Value.GetObject();
 65                    continue;
 66                }
 67            }
 268            return new StorageDirectoryDeletedEventData(api.Value, clientRequestId.Value, requestId.Value, url.Value, Op
 69        }
 70    }
 71}