< Summary

Class:Azure.Messaging.EventGrid.SystemEvents.MapsGeofenceEnteredEventData
Assembly:Azure.Messaging.EventGrid
File(s):C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MapsGeofenceEnteredEventData.cs
C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MapsGeofenceEnteredEventData.Serialization.cs
Covered lines:28
Uncovered lines:2
Coverable lines:30
Total lines:92
Line coverage:93.3% (28 of 30)
Covered branches:16
Total branches:16
Branch coverage:100% (16 of 16)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
DeserializeMapsGeofenceEnteredEventData(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MapsGeofenceEnteredEventData.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.Collections.Generic;
 9
 10namespace Azure.Messaging.EventGrid.SystemEvents
 11{
 12    /// <summary> Schema of the Data property of an EventGridEvent for a Microsoft.Maps.GeofenceEntered event. </summary
 13    public partial class MapsGeofenceEnteredEventData : MapsGeofenceEventProperties
 14    {
 15        /// <summary> Initializes a new instance of MapsGeofenceEnteredEventData. </summary>
 016        internal MapsGeofenceEnteredEventData()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of MapsGeofenceEnteredEventData. </summary>
 21        /// <param name="expiredGeofenceGeometryId"> Lists of the geometry ID of the geofence which is expired relative 
 22        /// <param name="geometries"> Lists the fence geometries that either fully contain the coordinate position or ha
 23        /// <param name="invalidPeriodGeofenceGeometryId"> Lists of the geometry ID of the geofence which is in invalid 
 24        /// <param name="isEventPublished"> True if at least one event is published to the Azure Maps event subscriber, 
 225        internal MapsGeofenceEnteredEventData(IReadOnlyList<string> expiredGeofenceGeometryId, IReadOnlyList<MapsGeofenc
 26        {
 227        }
 28    }
 29}

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MapsGeofenceEnteredEventData.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.Collections.Generic;
 9using System.Text.Json;
 10using Azure.Core;
 11
 12namespace Azure.Messaging.EventGrid.SystemEvents
 13{
 14    public partial class MapsGeofenceEnteredEventData
 15    {
 16        internal static MapsGeofenceEnteredEventData DeserializeMapsGeofenceEnteredEventData(JsonElement element)
 17        {
 218            Optional<IReadOnlyList<string>> expiredGeofenceGeometryId = default;
 219            Optional<IReadOnlyList<MapsGeofenceGeometry>> geometries = default;
 220            Optional<IReadOnlyList<string>> invalidPeriodGeofenceGeometryId = default;
 221            Optional<bool> isEventPublished = default;
 2022            foreach (var property in element.EnumerateObject())
 23            {
 824                if (property.NameEquals("expiredGeofenceGeometryId"))
 25                {
 226                    List<string> array = new List<string>();
 1227                    foreach (var item in property.Value.EnumerateArray())
 28                    {
 429                        array.Add(item.GetString());
 30                    }
 231                    expiredGeofenceGeometryId = array;
 232                    continue;
 33                }
 634                if (property.NameEquals("geometries"))
 35                {
 236                    List<MapsGeofenceGeometry> array = new List<MapsGeofenceGeometry>();
 837                    foreach (var item in property.Value.EnumerateArray())
 38                    {
 239                        array.Add(MapsGeofenceGeometry.DeserializeMapsGeofenceGeometry(item));
 40                    }
 241                    geometries = array;
 242                    continue;
 43                }
 444                if (property.NameEquals("invalidPeriodGeofenceGeometryId"))
 45                {
 246                    List<string> array = new List<string>();
 1247                    foreach (var item in property.Value.EnumerateArray())
 48                    {
 449                        array.Add(item.GetString());
 50                    }
 251                    invalidPeriodGeofenceGeometryId = array;
 252                    continue;
 53                }
 254                if (property.NameEquals("isEventPublished"))
 55                {
 256                    isEventPublished = property.Value.GetBoolean();
 57                    continue;
 58                }
 59            }
 260            return new MapsGeofenceEnteredEventData(Optional.ToList(expiredGeofenceGeometryId), Optional.ToList(geometri
 61        }
 62    }
 63}