< Summary

Class:Azure.Messaging.EventGrid.SystemEvents.MachineLearningServicesRunCompletedEventData
Assembly:Azure.Messaging.EventGrid
File(s):C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MachineLearningServicesRunCompletedEventData.cs
C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MachineLearningServicesRunCompletedEventData.Serialization.cs
Covered lines:33
Uncovered lines:8
Coverable lines:41
Total lines:107
Line coverage:80.4% (33 of 41)
Covered branches:13
Total branches:14
Branch coverage:92.8% (13 of 14)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_ExperimentId()-0%100%
get_ExperimentName()-100%100%
get_RunId()-100%100%
get_RunType()-0%100%
get_RunTags()-0%100%
get_RunProperties()-0%100%
DeserializeMachineLearningServicesRunCompletedEventData(...)-92%92.86%

File(s)

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MachineLearningServicesRunCompletedEventData.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.MachineLearningServices.RunCompleted
 11    public partial class MachineLearningServicesRunCompletedEventData
 12    {
 13        /// <summary> Initializes a new instance of MachineLearningServicesRunCompletedEventData. </summary>
 014        internal MachineLearningServicesRunCompletedEventData()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of MachineLearningServicesRunCompletedEventData. </summary>
 19        /// <param name="experimentId"> The ID of the experiment that the run belongs to. </param>
 20        /// <param name="experimentName"> The name of the experiment that the run belongs to. </param>
 21        /// <param name="runId"> The ID of the Run that was completed. </param>
 22        /// <param name="runType"> The Run Type of the completed Run. </param>
 23        /// <param name="runTags"> The tags of the completed Run. </param>
 24        /// <param name="runProperties"> The properties of the completed Run. </param>
 225        internal MachineLearningServicesRunCompletedEventData(string experimentId, string experimentName, string runId, 
 26        {
 227            ExperimentId = experimentId;
 228            ExperimentName = experimentName;
 229            RunId = runId;
 230            RunType = runType;
 231            RunTags = runTags;
 232            RunProperties = runProperties;
 233        }
 34
 35        /// <summary> The ID of the experiment that the run belongs to. </summary>
 036        public string ExperimentId { get; }
 37        /// <summary> The name of the experiment that the run belongs to. </summary>
 238        public string ExperimentName { get; }
 39        /// <summary> The ID of the Run that was completed. </summary>
 240        public string RunId { get; }
 41        /// <summary> The Run Type of the completed Run. </summary>
 042        public string RunType { get; }
 43        /// <summary> The tags of the completed Run. </summary>
 044        public object RunTags { get; }
 45        /// <summary> The properties of the completed Run. </summary>
 046        public object RunProperties { get; }
 47    }
 48}

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MachineLearningServicesRunCompletedEventData.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 MachineLearningServicesRunCompletedEventData
 14    {
 15        internal static MachineLearningServicesRunCompletedEventData DeserializeMachineLearningServicesRunCompletedEvent
 16        {
 217            Optional<string> experimentId = default;
 218            Optional<string> experimentName = default;
 219            Optional<string> runId = default;
 220            Optional<string> runType = default;
 221            Optional<object> runTags = default;
 222            Optional<object> runProperties = default;
 2823            foreach (var property in element.EnumerateObject())
 24            {
 1225                if (property.NameEquals("experimentId"))
 26                {
 227                    experimentId = property.Value.GetString();
 228                    continue;
 29                }
 1030                if (property.NameEquals("experimentName"))
 31                {
 232                    experimentName = property.Value.GetString();
 233                    continue;
 34                }
 835                if (property.NameEquals("runId"))
 36                {
 237                    runId = property.Value.GetString();
 238                    continue;
 39                }
 640                if (property.NameEquals("runType"))
 41                {
 242                    runType = property.Value.GetString();
 243                    continue;
 44                }
 445                if (property.NameEquals("runTags"))
 46                {
 047                    runTags = property.Value.GetObject();
 048                    continue;
 49                }
 450                if (property.NameEquals("runProperties"))
 51                {
 252                    runProperties = property.Value.GetObject();
 53                    continue;
 54                }
 55            }
 256            return new MachineLearningServicesRunCompletedEventData(experimentId.Value, experimentName.Value, runId.Valu
 57        }
 58    }
 59}