< Summary

Class:Azure.ResourceManager.Compute.Models.AvailabilitySetUpdate
Assembly:Azure.ResourceManager.Compute
File(s):C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\AvailabilitySetUpdate.cs
C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\AvailabilitySetUpdate.Serialization.cs
Covered lines:22
Uncovered lines:31
Coverable lines:53
Total lines:126
Line coverage:41.5% (22 of 53)
Covered branches:10
Total branches:20
Branch coverage:50% (10 of 20)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-100%100%
.ctor(...)-0%100%
get_Sku()-0%100%
get_PlatformUpdateDomainCount()-0%100%
get_PlatformFaultDomainCount()-0%100%
get_VirtualMachines()-0%100%
get_ProximityPlacementGroup()-0%100%
get_Statuses()-100%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-51.35%50%

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\AvailabilitySetUpdate.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 availability set that the virtual machine should be assigned to. Only 
 13    public partial class AvailabilitySetUpdate : UpdateResource
 14    {
 15        /// <summary> Initializes a new instance of AvailabilitySetUpdate. </summary>
 416        public AvailabilitySetUpdate()
 17        {
 418        }
 19
 20        /// <summary> Initializes a new instance of AvailabilitySetUpdate. </summary>
 21        /// <param name="tags"> Resource tags. </param>
 22        /// <param name="sku"> Sku of the availability set. </param>
 23        /// <param name="platformUpdateDomainCount"> Update Domain count. </param>
 24        /// <param name="platformFaultDomainCount"> Fault Domain count. </param>
 25        /// <param name="virtualMachines"> A list of references to all virtual machines in the availability set. </param
 26        /// <param name="proximityPlacementGroup"> Specifies information about the proximity placement group that the av
 27        /// <param name="statuses"> The resource status information. </param>
 028        internal AvailabilitySetUpdate(IDictionary<string, string> tags, Sku sku, int? platformUpdateDomainCount, int? p
 29        {
 030            Sku = sku;
 031            PlatformUpdateDomainCount = platformUpdateDomainCount;
 032            PlatformFaultDomainCount = platformFaultDomainCount;
 033            VirtualMachines = virtualMachines;
 034            ProximityPlacementGroup = proximityPlacementGroup;
 035            Statuses = statuses;
 036        }
 37
 38        /// <summary> Sku of the availability set. </summary>
 039        public Sku Sku { get; set; }
 40        /// <summary> Update Domain count. </summary>
 041        public int? PlatformUpdateDomainCount { get; set; }
 42        /// <summary> Fault Domain count. </summary>
 043        public int? PlatformFaultDomainCount { get; set; }
 44        /// <summary> A list of references to all virtual machines in the availability set. </summary>
 045        public IList<SubResource> VirtualMachines { get; set; }
 46        /// <summary> Specifies information about the proximity placement group that the availability set should be assi
 047        public SubResource ProximityPlacementGroup { get; set; }
 48        /// <summary> The resource status information. </summary>
 449        public IList<InstanceViewStatus> Statuses { get; }
 50    }
 51}

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\AvailabilitySetUpdate.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 AvailabilitySetUpdate : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 417            writer.WriteStartObject();
 418            if (Sku != null)
 19            {
 020                writer.WritePropertyName("sku");
 021                writer.WriteObjectValue(Sku);
 22            }
 423            if (Tags != null)
 24            {
 425                writer.WritePropertyName("tags");
 426                writer.WriteStartObject();
 3227                foreach (var item in Tags)
 28                {
 1229                    writer.WritePropertyName(item.Key);
 1230                    writer.WriteStringValue(item.Value);
 31                }
 432                writer.WriteEndObject();
 33            }
 434            writer.WritePropertyName("properties");
 435            writer.WriteStartObject();
 436            if (PlatformUpdateDomainCount != null)
 37            {
 038                writer.WritePropertyName("platformUpdateDomainCount");
 039                writer.WriteNumberValue(PlatformUpdateDomainCount.Value);
 40            }
 441            if (PlatformFaultDomainCount != null)
 42            {
 043                writer.WritePropertyName("platformFaultDomainCount");
 044                writer.WriteNumberValue(PlatformFaultDomainCount.Value);
 45            }
 446            if (VirtualMachines != null)
 47            {
 048                writer.WritePropertyName("virtualMachines");
 049                writer.WriteStartArray();
 050                foreach (var item in VirtualMachines)
 51                {
 052                    writer.WriteObjectValue(item);
 53                }
 054                writer.WriteEndArray();
 55            }
 456            if (ProximityPlacementGroup != null)
 57            {
 058                writer.WritePropertyName("proximityPlacementGroup");
 059                writer.WriteObjectValue(ProximityPlacementGroup);
 60            }
 461            if (Statuses != null)
 62            {
 063                writer.WritePropertyName("statuses");
 064                writer.WriteStartArray();
 065                foreach (var item in Statuses)
 66                {
 067                    writer.WriteObjectValue(item);
 68                }
 069                writer.WriteEndArray();
 70            }
 471            writer.WriteEndObject();
 472            writer.WriteEndObject();
 473        }
 74    }
 75}