< Summary

Class:Azure.ResourceManager.Compute.Models.DedicatedHostGroupUpdate
Assembly:Azure.ResourceManager.Compute
File(s):C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\DedicatedHostGroupUpdate.cs
C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\DedicatedHostGroupUpdate.Serialization.cs
Covered lines:22
Uncovered lines:16
Coverable lines:38
Total lines:99
Line coverage:57.8% (22 of 38)
Covered branches:8
Total branches:14
Branch coverage:57.1% (8 of 14)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-100%100%
.ctor(...)-0%100%
get_Zones()-0%100%
get_PlatformFaultDomainCount()-100%100%
get_Hosts()-100%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-64.29%57.14%

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\DedicatedHostGroupUpdate.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.ResourceManager.Compute.Models
 11{
 12    /// <summary> Specifies information about the dedicated host group that the dedicated host should be assigned to. On
 13    public partial class DedicatedHostGroupUpdate : UpdateResource
 14    {
 15        /// <summary> Initializes a new instance of DedicatedHostGroupUpdate. </summary>
 416        public DedicatedHostGroupUpdate()
 17        {
 418        }
 19
 20        /// <summary> Initializes a new instance of DedicatedHostGroupUpdate. </summary>
 21        /// <param name="tags"> Resource tags. </param>
 22        /// <param name="zones"> Availability Zone to use for this host group. Only single zone is supported. The zone c
 23        /// <param name="platformFaultDomainCount"> Number of fault domains that the host group can span. </param>
 24        /// <param name="hosts"> A list of references to all dedicated hosts in the dedicated host group. </param>
 025        internal DedicatedHostGroupUpdate(IDictionary<string, string> tags, IList<string> zones, int? platformFaultDomai
 26        {
 027            Zones = zones;
 028            PlatformFaultDomainCount = platformFaultDomainCount;
 029            Hosts = hosts;
 030        }
 31
 32        /// <summary> Availability Zone to use for this host group. Only single zone is supported. The zone can be assig
 033        public IList<string> Zones { get; set; }
 34        /// <summary> Number of fault domains that the host group can span. </summary>
 1235        public int? PlatformFaultDomainCount { get; set; }
 36        /// <summary> A list of references to all dedicated hosts in the dedicated host group. </summary>
 437        public IList<SubResourceReadOnly> Hosts { get; }
 38    }
 39}

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\DedicatedHostGroupUpdate.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 DedicatedHostGroupUpdate : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 417            writer.WriteStartObject();
 418            if (Zones != null)
 19            {
 020                writer.WritePropertyName("zones");
 021                writer.WriteStartArray();
 022                foreach (var item in Zones)
 23                {
 024                    writer.WriteStringValue(item);
 25                }
 026                writer.WriteEndArray();
 27            }
 428            if (Tags != null)
 29            {
 430                writer.WritePropertyName("tags");
 431                writer.WriteStartObject();
 1632                foreach (var item in Tags)
 33                {
 434                    writer.WritePropertyName(item.Key);
 435                    writer.WriteStringValue(item.Value);
 36                }
 437                writer.WriteEndObject();
 38            }
 439            writer.WritePropertyName("properties");
 440            writer.WriteStartObject();
 441            if (PlatformFaultDomainCount != null)
 42            {
 443                writer.WritePropertyName("platformFaultDomainCount");
 444                writer.WriteNumberValue(PlatformFaultDomainCount.Value);
 45            }
 446            if (Hosts != null)
 47            {
 048                writer.WritePropertyName("hosts");
 049                writer.WriteStartArray();
 050                foreach (var item in Hosts)
 51                {
 052                    writer.WriteObjectValue(item);
 53                }
 054                writer.WriteEndArray();
 55            }
 456            writer.WriteEndObject();
 457            writer.WriteEndObject();
 458        }
 59    }
 60}