< Summary

Class:Azure.Messaging.EventGrid.SystemEvents.MachineLearningServicesModelDeployedEventData
Assembly:Azure.Messaging.EventGrid
File(s):C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MachineLearningServicesModelDeployedEventData.cs
C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MachineLearningServicesModelDeployedEventData.Serialization.cs
Covered lines:30
Uncovered lines:5
Coverable lines:35
Total lines:97
Line coverage:85.7% (30 of 35)
Covered branches:12
Total branches:12
Branch coverage:100% (12 of 12)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_ServiceName()-100%100%
get_ServiceComputeType()-0%100%
get_ModelIds()-100%100%
get_ServiceTags()-0%100%
get_ServiceProperties()-0%100%
DeserializeMachineLearningServicesModelDeployedEventData(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MachineLearningServicesModelDeployedEventData.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.ModelDeploye
 11    public partial class MachineLearningServicesModelDeployedEventData
 12    {
 13        /// <summary> Initializes a new instance of MachineLearningServicesModelDeployedEventData. </summary>
 014        internal MachineLearningServicesModelDeployedEventData()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of MachineLearningServicesModelDeployedEventData. </summary>
 19        /// <param name="serviceName"> The name of the deployed service. </param>
 20        /// <param name="serviceComputeType"> The compute type (e.g. ACI, AKS) of the deployed service. </param>
 21        /// <param name="modelIds"> A common separated list of model IDs. The IDs of the models deployed in the service.
 22        /// <param name="serviceTags"> The tags of the deployed service. </param>
 23        /// <param name="serviceProperties"> The properties of the deployed service. </param>
 224        internal MachineLearningServicesModelDeployedEventData(string serviceName, string serviceComputeType, string mod
 25        {
 226            ServiceName = serviceName;
 227            ServiceComputeType = serviceComputeType;
 228            ModelIds = modelIds;
 229            ServiceTags = serviceTags;
 230            ServiceProperties = serviceProperties;
 231        }
 32
 33        /// <summary> The name of the deployed service. </summary>
 234        public string ServiceName { get; }
 35        /// <summary> The compute type (e.g. ACI, AKS) of the deployed service. </summary>
 036        public string ServiceComputeType { get; }
 37        /// <summary> A common separated list of model IDs. The IDs of the models deployed in the service. </summary>
 238        public string ModelIds { get; }
 39        /// <summary> The tags of the deployed service. </summary>
 040        public object ServiceTags { get; }
 41        /// <summary> The properties of the deployed service. </summary>
 042        public object ServiceProperties { get; }
 43    }
 44}

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MachineLearningServicesModelDeployedEventData.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 MachineLearningServicesModelDeployedEventData
 14    {
 15        internal static MachineLearningServicesModelDeployedEventData DeserializeMachineLearningServicesModelDeployedEve
 16        {
 217            Optional<string> serviceName = default;
 218            Optional<string> serviceComputeType = default;
 219            Optional<string> modelIds = default;
 220            Optional<object> serviceTags = default;
 221            Optional<object> serviceProperties = default;
 2422            foreach (var property in element.EnumerateObject())
 23            {
 1024                if (property.NameEquals("serviceName"))
 25                {
 226                    serviceName = property.Value.GetString();
 227                    continue;
 28                }
 829                if (property.NameEquals("serviceComputeType"))
 30                {
 231                    serviceComputeType = property.Value.GetString();
 232                    continue;
 33                }
 634                if (property.NameEquals("modelIds"))
 35                {
 236                    modelIds = property.Value.GetString();
 237                    continue;
 38                }
 439                if (property.NameEquals("serviceTags"))
 40                {
 241                    serviceTags = property.Value.GetObject();
 242                    continue;
 43                }
 244                if (property.NameEquals("serviceProperties"))
 45                {
 246                    serviceProperties = property.Value.GetObject();
 47                    continue;
 48                }
 49            }
 250            return new MachineLearningServicesModelDeployedEventData(serviceName.Value, serviceComputeType.Value, modelI
 51        }
 52    }
 53}