< Summary

Class:Azure.ResourceManager.Compute.Models.OrchestrationServiceSummary
Assembly:Azure.ResourceManager.Compute
File(s):C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\OrchestrationServiceSummary.cs
C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\OrchestrationServiceSummary.Serialization.cs
Covered lines:20
Uncovered lines:0
Coverable lines:20
Total lines:76
Line coverage:100% (20 of 20)
Covered branches:10
Total branches:10
Branch coverage:100% (10 of 10)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-100%100%
.ctor(...)-100%100%
get_ServiceName()-100%100%
get_ServiceState()-100%100%
DeserializeOrchestrationServiceSummary(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\OrchestrationServiceSummary.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.ResourceManager.Compute.Models
 9{
 10    /// <summary> Summary for an orchestration service of a virtual machine scale set. </summary>
 11    public partial class OrchestrationServiceSummary
 12    {
 13        /// <summary> Initializes a new instance of OrchestrationServiceSummary. </summary>
 814        internal OrchestrationServiceSummary()
 15        {
 816            ServiceName = "AutomaticRepairs";
 817        }
 18
 19        /// <summary> Initializes a new instance of OrchestrationServiceSummary. </summary>
 20        /// <param name="serviceName"> The name of the service. </param>
 21        /// <param name="serviceState"> The current state of the service. </param>
 1222        internal OrchestrationServiceSummary(string serviceName, OrchestrationServiceState? serviceState)
 23        {
 1224            ServiceName = serviceName;
 1225            ServiceState = serviceState;
 1226        }
 27
 28        /// <summary> The name of the service. </summary>
 1229        public string ServiceName { get; }
 30        /// <summary> The current state of the service. </summary>
 1231        public OrchestrationServiceState? ServiceState { get; }
 32    }
 33}

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\OrchestrationServiceSummary.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.ResourceManager.Compute.Models
 12{
 13    public partial class OrchestrationServiceSummary
 14    {
 15        internal static OrchestrationServiceSummary DeserializeOrchestrationServiceSummary(JsonElement element)
 16        {
 1217            string serviceName = default;
 1218            OrchestrationServiceState? serviceState = default;
 7219            foreach (var property in element.EnumerateObject())
 20            {
 2421                if (property.NameEquals("serviceName"))
 22                {
 1223                    if (property.Value.ValueKind == JsonValueKind.Null)
 24                    {
 25                        continue;
 26                    }
 1227                    serviceName = property.Value.GetString();
 1228                    continue;
 29                }
 1230                if (property.NameEquals("serviceState"))
 31                {
 1232                    if (property.Value.ValueKind == JsonValueKind.Null)
 33                    {
 34                        continue;
 35                    }
 1236                    serviceState = new OrchestrationServiceState(property.Value.GetString());
 37                    continue;
 38                }
 39            }
 1240            return new OrchestrationServiceSummary(serviceName, serviceState);
 41        }
 42    }
 43}