< Summary

Class:Azure.Messaging.EventGrid.SystemEvents.StorageBlobRenamedEventData
Assembly:Azure.Messaging.EventGrid
File(s):C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\StorageBlobRenamedEventData.cs
C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\StorageBlobRenamedEventData.Serialization.cs
Covered lines:39
Uncovered lines:14
Coverable lines:53
Total lines:127
Line coverage:73.5% (39 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_SourceUrl()-0%100%
get_DestinationUrl()-100%100%
get_Sequencer()-0%100%
get_Identity()-0%100%
get_StorageDiagnostics()-0%100%
DeserializeStorageBlobRenamedEventData(...)-84.85%83.33%

File(s)

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\StorageBlobRenamedEventData.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.BlobRenamed event. </summary
 11    public partial class StorageBlobRenamedEventData
 12    {
 13        /// <summary> Initializes a new instance of StorageBlobRenamedEventData. </summary>
 014        internal StorageBlobRenamedEventData()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of StorageBlobRenamedEventData. </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="sourceUrl"> The path to the blob that was renamed. </param>
 23        /// <param name="destinationUrl"> The new path to the blob after the rename 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 StorageBlobRenamedEventData(string api, string clientRequestId, string requestId, string sourceUrl, str
 28        {
 229            Api = api;
 230            ClientRequestId = clientRequestId;
 231            RequestId = requestId;
 232            SourceUrl = sourceUrl;
 233            DestinationUrl = destinationUrl;
 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 blob that was renamed. </summary>
 046        public string SourceUrl { get; }
 47        /// <summary> The new path to the blob after the rename operation. </summary>
 248        public string DestinationUrl { get; }
 49        /// <summary> An opaque string value representing the logical sequence of events for any particular blob name. U
 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\StorageBlobRenamedEventData.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 StorageBlobRenamedEventData
 14    {
 15        internal static StorageBlobRenamedEventData DeserializeStorageBlobRenamedEventData(JsonElement element)
 16        {
 217            Optional<string> api = default;
 218            Optional<string> clientRequestId = default;
 219            Optional<string> requestId = default;
 220            Optional<string> sourceUrl = default;
 221            Optional<string> destinationUrl = default;
 222            Optional<string> sequencer = default;
 223            Optional<string> identity = default;
 224            Optional<object> storageDiagnostics = default;
 2825            foreach (var property in element.EnumerateObject())
 26            {
 1227                if (property.NameEquals("api"))
 28                {
 229                    api = property.Value.GetString();
 230                    continue;
 31                }
 1032                if (property.NameEquals("clientRequestId"))
 33                {
 234                    clientRequestId = property.Value.GetString();
 235                    continue;
 36                }
 837                if (property.NameEquals("requestId"))
 38                {
 239                    requestId = property.Value.GetString();
 240                    continue;
 41                }
 642                if (property.NameEquals("sourceUrl"))
 43                {
 044                    sourceUrl = property.Value.GetString();
 045                    continue;
 46                }
 647                if (property.NameEquals("destinationUrl"))
 48                {
 249                    destinationUrl = property.Value.GetString();
 250                    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                {
 064                    storageDiagnostics = property.Value.GetObject();
 65                    continue;
 66                }
 67            }
 268            return new StorageBlobRenamedEventData(api.Value, clientRequestId.Value, requestId.Value, sourceUrl.Value, d
 69        }
 70    }
 71}