< Summary

Class:Azure.Messaging.EventGrid.SystemEvents.StorageBlobDeletedEventData
Assembly:Azure.Messaging.EventGrid
File(s):C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\StorageBlobDeletedEventData.cs
C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\StorageBlobDeletedEventData.Serialization.cs
Covered lines:45
Uncovered lines:14
Coverable lines:59
Total lines:137
Line coverage:76.2% (45 of 59)
Covered branches:18
Total branches:20
Branch coverage:90% (18 of 20)

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_ContentType()-0%100%
get_BlobType()-0%100%
get_Url()-100%100%
get_Sequencer()-0%100%
get_Identity()-0%100%
get_StorageDiagnostics()-0%100%
DeserializeStorageBlobDeletedEventData(...)-89.19%90%

File(s)

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\StorageBlobDeletedEventData.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.BlobDeleted event. </summary
 11    public partial class StorageBlobDeletedEventData
 12    {
 13        /// <summary> Initializes a new instance of StorageBlobDeletedEventData. </summary>
 014        internal StorageBlobDeletedEventData()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of StorageBlobDeletedEventData. </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="contentType"> The content type of the blob. This is the same as what would be returned in the C
 23        /// <param name="blobType"> The type of blob. </param>
 24        /// <param name="url"> The path to the blob. </param>
 25        /// <param name="sequencer"> An opaque string value representing the logical sequence of events for any particul
 26        /// <param name="identity"> The identity of the requester that triggered this event. </param>
 27        /// <param name="storageDiagnostics"> For service use only. Diagnostic data occasionally included by the Azure S
 1428        internal StorageBlobDeletedEventData(string api, string clientRequestId, string requestId, string contentType, s
 29        {
 1430            Api = api;
 1431            ClientRequestId = clientRequestId;
 1432            RequestId = requestId;
 1433            ContentType = contentType;
 1434            BlobType = blobType;
 1435            Url = url;
 1436            Sequencer = sequencer;
 1437            Identity = identity;
 1438            StorageDiagnostics = storageDiagnostics;
 1439        }
 40
 41        /// <summary> The name of the API/operation that triggered this event. </summary>
 042        public string Api { get; }
 43        /// <summary> A request id provided by the client of the storage API operation that triggered this event. </summ
 044        public string ClientRequestId { get; }
 45        /// <summary> The request id generated by the Storage service for the storage API operation that triggered this 
 046        public string RequestId { get; }
 47        /// <summary> The content type of the blob. This is the same as what would be returned in the Content-Type heade
 048        public string ContentType { get; }
 49        /// <summary> The type of blob. </summary>
 050        public string BlobType { get; }
 51        /// <summary> The path to the blob. </summary>
 1052        public string Url { get; }
 53        /// <summary> An opaque string value representing the logical sequence of events for any particular blob name. U
 054        public string Sequencer { get; }
 55        /// <summary> The identity of the requester that triggered this event. </summary>
 056        public string Identity { get; }
 57        /// <summary> For service use only. Diagnostic data occasionally included by the Azure Storage service. This pro
 058        public object StorageDiagnostics { get; }
 59    }
 60}

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\StorageBlobDeletedEventData.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 StorageBlobDeletedEventData
 14    {
 15        internal static StorageBlobDeletedEventData DeserializeStorageBlobDeletedEventData(JsonElement element)
 16        {
 1417            Optional<string> api = default;
 1418            Optional<string> clientRequestId = default;
 1419            Optional<string> requestId = default;
 1420            Optional<string> contentType = default;
 1421            Optional<string> blobType = default;
 1422            Optional<string> url = default;
 1423            Optional<string> sequencer = default;
 1424            Optional<string> identity = default;
 1425            Optional<object> storageDiagnostics = default;
 23226            foreach (var property in element.EnumerateObject())
 27            {
 10228                if (property.NameEquals("api"))
 29                {
 1430                    api = property.Value.GetString();
 1431                    continue;
 32                }
 8833                if (property.NameEquals("clientRequestId"))
 34                {
 035                    clientRequestId = property.Value.GetString();
 036                    continue;
 37                }
 8838                if (property.NameEquals("requestId"))
 39                {
 1440                    requestId = property.Value.GetString();
 1441                    continue;
 42                }
 7443                if (property.NameEquals("contentType"))
 44                {
 1445                    contentType = property.Value.GetString();
 1446                    continue;
 47                }
 6048                if (property.NameEquals("blobType"))
 49                {
 1450                    blobType = property.Value.GetString();
 1451                    continue;
 52                }
 4653                if (property.NameEquals("url"))
 54                {
 1455                    url = property.Value.GetString();
 1456                    continue;
 57                }
 3258                if (property.NameEquals("sequencer"))
 59                {
 1460                    sequencer = property.Value.GetString();
 1461                    continue;
 62                }
 1863                if (property.NameEquals("identity"))
 64                {
 065                    identity = property.Value.GetString();
 066                    continue;
 67                }
 1868                if (property.NameEquals("storageDiagnostics"))
 69                {
 1470                    storageDiagnostics = property.Value.GetObject();
 71                    continue;
 72                }
 73            }
 1474            return new StorageBlobDeletedEventData(api.Value, clientRequestId.Value, requestId.Value, contentType.Value,
 75        }
 76    }
 77}