< Summary

Class:Azure.Messaging.EventGrid.SystemEvents.MachineLearningServicesDatasetDriftDetectedEventData
Assembly:Azure.Messaging.EventGrid
File(s):C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MachineLearningServicesDatasetDriftDetectedEventData.cs
C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MachineLearningServicesDatasetDriftDetectedEventData.Serialization.cs
Covered lines:44
Uncovered lines:9
Coverable lines:53
Total lines:130
Line coverage:83% (44 of 53)
Covered branches:18
Total branches:18
Branch coverage:100% (18 of 18)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_DataDriftId()-0%100%
get_DataDriftName()-100%100%
get_RunId()-0%100%
get_BaseDatasetId()-0%100%
get_TargetDatasetId()-0%100%
get_DriftCoefficient()-0%100%
get_StartTime()-0%100%
get_EndTime()-0%100%
DeserializeMachineLearningServicesDatasetDriftDetectedEventData(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MachineLearningServicesDatasetDriftDetectedEventData.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.MachineLearningServices.DatasetDrift
 13    public partial class MachineLearningServicesDatasetDriftDetectedEventData
 14    {
 15        /// <summary> Initializes a new instance of MachineLearningServicesDatasetDriftDetectedEventData. </summary>
 016        internal MachineLearningServicesDatasetDriftDetectedEventData()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of MachineLearningServicesDatasetDriftDetectedEventData. </summary>
 21        /// <param name="dataDriftId"> The ID of the data drift monitor that triggered the event. </param>
 22        /// <param name="dataDriftName"> The name of the data drift monitor that triggered the event. </param>
 23        /// <param name="runId"> The ID of the Run that detected data drift. </param>
 24        /// <param name="baseDatasetId"> The ID of the base Dataset used to detect drift. </param>
 25        /// <param name="targetDatasetId"> The ID of the target Dataset used to detect drift. </param>
 26        /// <param name="driftCoefficient"> The coefficient result that triggered the event. </param>
 27        /// <param name="startTime"> The start time of the target dataset time series that resulted in drift detection. 
 28        /// <param name="endTime"> The end time of the target dataset time series that resulted in drift detection. </pa
 229        internal MachineLearningServicesDatasetDriftDetectedEventData(string dataDriftId, string dataDriftName, string r
 30        {
 231            DataDriftId = dataDriftId;
 232            DataDriftName = dataDriftName;
 233            RunId = runId;
 234            BaseDatasetId = baseDatasetId;
 235            TargetDatasetId = targetDatasetId;
 236            DriftCoefficient = driftCoefficient;
 237            StartTime = startTime;
 238            EndTime = endTime;
 239        }
 40
 41        /// <summary> The ID of the data drift monitor that triggered the event. </summary>
 042        public string DataDriftId { get; }
 43        /// <summary> The name of the data drift monitor that triggered the event. </summary>
 244        public string DataDriftName { get; }
 45        /// <summary> The ID of the Run that detected data drift. </summary>
 046        public string RunId { get; }
 47        /// <summary> The ID of the base Dataset used to detect drift. </summary>
 048        public string BaseDatasetId { get; }
 49        /// <summary> The ID of the target Dataset used to detect drift. </summary>
 050        public string TargetDatasetId { get; }
 51        /// <summary> The coefficient result that triggered the event. </summary>
 052        public double? DriftCoefficient { get; }
 53        /// <summary> The start time of the target dataset time series that resulted in drift detection. </summary>
 054        public DateTimeOffset? StartTime { get; }
 55        /// <summary> The end time of the target dataset time series that resulted in drift detection. </summary>
 056        public DateTimeOffset? EndTime { get; }
 57    }
 58}

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MachineLearningServicesDatasetDriftDetectedEventData.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 MachineLearningServicesDatasetDriftDetectedEventData
 15    {
 16        internal static MachineLearningServicesDatasetDriftDetectedEventData DeserializeMachineLearningServicesDatasetDr
 17        {
 218            Optional<string> dataDriftId = default;
 219            Optional<string> dataDriftName = default;
 220            Optional<string> runId = default;
 221            Optional<string> baseDatasetId = default;
 222            Optional<string> targetDatasetId = default;
 223            Optional<double> driftCoefficient = default;
 224            Optional<DateTimeOffset> startTime = default;
 225            Optional<DateTimeOffset> endTime = default;
 3626            foreach (var property in element.EnumerateObject())
 27            {
 1628                if (property.NameEquals("dataDriftId"))
 29                {
 230                    dataDriftId = property.Value.GetString();
 231                    continue;
 32                }
 1433                if (property.NameEquals("dataDriftName"))
 34                {
 235                    dataDriftName = property.Value.GetString();
 236                    continue;
 37                }
 1238                if (property.NameEquals("runId"))
 39                {
 240                    runId = property.Value.GetString();
 241                    continue;
 42                }
 1043                if (property.NameEquals("baseDatasetId"))
 44                {
 245                    baseDatasetId = property.Value.GetString();
 246                    continue;
 47                }
 848                if (property.NameEquals("targetDatasetId"))
 49                {
 250                    targetDatasetId = property.Value.GetString();
 251                    continue;
 52                }
 653                if (property.NameEquals("driftCoefficient"))
 54                {
 255                    driftCoefficient = property.Value.GetDouble();
 256                    continue;
 57                }
 458                if (property.NameEquals("startTime"))
 59                {
 260                    startTime = property.Value.GetDateTimeOffset("O");
 261                    continue;
 62                }
 263                if (property.NameEquals("endTime"))
 64                {
 265                    endTime = property.Value.GetDateTimeOffset("O");
 66                    continue;
 67                }
 68            }
 269            return new MachineLearningServicesDatasetDriftDetectedEventData(dataDriftId.Value, dataDriftName.Value, runI
 70        }
 71    }
 72}