< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Timestamp()-0%100%
get_Name()-0%100%
get_Status()-0%100%
DeserializeRedisScalingCompletedEventData(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\RedisScalingCompletedEventData.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;
 9
 10namespace Azure.Messaging.EventGrid.SystemEvents
 11{
 12    /// <summary> Schema of the Data property of an EventGridEvent for an Microsoft.Cache.ScalingCompleted event. </summ
 13    public partial class RedisScalingCompletedEventData
 14    {
 15        /// <summary> Initializes a new instance of RedisScalingCompletedEventData. </summary>
 016        internal RedisScalingCompletedEventData()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of RedisScalingCompletedEventData. </summary>
 21        /// <param name="timestamp"> The time at which the event occurred. </param>
 22        /// <param name="name"> The name of this event. </param>
 23        /// <param name="status"> The status of this event. Failed or  succeeded. </param>
 024        internal RedisScalingCompletedEventData(DateTimeOffset? timestamp, string name, string status)
 25        {
 026            Timestamp = timestamp;
 027            Name = name;
 028            Status = status;
 029        }
 30
 31        /// <summary> The time at which the event occurred. </summary>
 032        public DateTimeOffset? Timestamp { get; }
 33        /// <summary> The name of this event. </summary>
 034        public string Name { get; }
 35        /// <summary> The status of this event. Failed or  succeeded. </summary>
 036        public string Status { get; }
 37    }
 38}

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\RedisScalingCompletedEventData.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;
 9using System.Text.Json;
 10using Azure.Core;
 11
 12namespace Azure.Messaging.EventGrid.SystemEvents
 13{
 14    public partial class RedisScalingCompletedEventData
 15    {
 16        internal static RedisScalingCompletedEventData DeserializeRedisScalingCompletedEventData(JsonElement element)
 17        {
 018            Optional<DateTimeOffset> timestamp = default;
 019            Optional<string> name = default;
 020            Optional<string> status = default;
 021            foreach (var property in element.EnumerateObject())
 22            {
 023                if (property.NameEquals("timestamp"))
 24                {
 025                    timestamp = property.Value.GetDateTimeOffset("O");
 026                    continue;
 27                }
 028                if (property.NameEquals("name"))
 29                {
 030                    name = property.Value.GetString();
 031                    continue;
 32                }
 033                if (property.NameEquals("status"))
 34                {
 035                    status = property.Value.GetString();
 36                    continue;
 37                }
 38            }
 039            return new RedisScalingCompletedEventData(Optional.ToNullable(timestamp), name.Value, status.Value);
 40        }
 41    }
 42}