< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_PlatformFaultDomain()-0%100%
get_AutoReplaceOnFailure()-0%100%
get_HostId()-0%100%
get_VirtualMachines()-0%100%
get_LicenseType()-0%100%
get_ProvisioningTime()-0%100%
get_ProvisioningState()-0%100%
get_InstanceView()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\DedicatedHostUpdate.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.Collections.Generic;
 10
 11namespace Azure.ResourceManager.Compute.Models
 12{
 13    /// <summary> Specifies information about the dedicated host. Only tags, autoReplaceOnFailure and licenseType may be
 14    public partial class DedicatedHostUpdate : UpdateResource
 15    {
 16        /// <summary> Initializes a new instance of DedicatedHostUpdate. </summary>
 017        public DedicatedHostUpdate()
 18        {
 019        }
 20
 21        /// <summary> Initializes a new instance of DedicatedHostUpdate. </summary>
 22        /// <param name="tags"> Resource tags. </param>
 23        /// <param name="platformFaultDomain"> Fault domain of the dedicated host within a dedicated host group. </param
 24        /// <param name="autoReplaceOnFailure"> Specifies whether the dedicated host should be replaced automatically in
 25        /// <param name="hostId"> A unique id generated and assigned to the dedicated host by the platform. &lt;br&gt;&l
 26        /// <param name="virtualMachines"> A list of references to all virtual machines in the Dedicated Host. </param>
 27        /// <param name="licenseType"> Specifies the software license type that will be applied to the VMs deployed on t
 28        /// <param name="provisioningTime"> The date when the host was first provisioned. </param>
 29        /// <param name="provisioningState"> The provisioning state, which only appears in the response. </param>
 30        /// <param name="instanceView"> The dedicated host instance view. </param>
 031        internal DedicatedHostUpdate(IDictionary<string, string> tags, int? platformFaultDomain, bool? autoReplaceOnFail
 32        {
 033            PlatformFaultDomain = platformFaultDomain;
 034            AutoReplaceOnFailure = autoReplaceOnFailure;
 035            HostId = hostId;
 036            VirtualMachines = virtualMachines;
 037            LicenseType = licenseType;
 038            ProvisioningTime = provisioningTime;
 039            ProvisioningState = provisioningState;
 040            InstanceView = instanceView;
 041        }
 42
 43        /// <summary> Fault domain of the dedicated host within a dedicated host group. </summary>
 044        public int? PlatformFaultDomain { get; set; }
 45        /// <summary> Specifies whether the dedicated host should be replaced automatically in case of a failure. The va
 046        public bool? AutoReplaceOnFailure { get; set; }
 47        /// <summary> A unique id generated and assigned to the dedicated host by the platform. &lt;br&gt;&lt;br&gt; Doe
 048        public string HostId { get; }
 49        /// <summary> A list of references to all virtual machines in the Dedicated Host. </summary>
 050        public IList<SubResourceReadOnly> VirtualMachines { get; }
 51        /// <summary> Specifies the software license type that will be applied to the VMs deployed on the dedicated host
 052        public DedicatedHostLicenseTypes? LicenseType { get; set; }
 53        /// <summary> The date when the host was first provisioned. </summary>
 054        public DateTimeOffset? ProvisioningTime { get; }
 55        /// <summary> The provisioning state, which only appears in the response. </summary>
 056        public string ProvisioningState { get; }
 57        /// <summary> The dedicated host instance view. </summary>
 058        public DedicatedHostInstanceView InstanceView { get; }
 59    }
 60}

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\DedicatedHostUpdate.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 DedicatedHostUpdate : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            if (Tags != null)
 19            {
 020                writer.WritePropertyName("tags");
 021                writer.WriteStartObject();
 022                foreach (var item in Tags)
 23                {
 024                    writer.WritePropertyName(item.Key);
 025                    writer.WriteStringValue(item.Value);
 26                }
 027                writer.WriteEndObject();
 28            }
 029            writer.WritePropertyName("properties");
 030            writer.WriteStartObject();
 031            if (PlatformFaultDomain != null)
 32            {
 033                writer.WritePropertyName("platformFaultDomain");
 034                writer.WriteNumberValue(PlatformFaultDomain.Value);
 35            }
 036            if (AutoReplaceOnFailure != null)
 37            {
 038                writer.WritePropertyName("autoReplaceOnFailure");
 039                writer.WriteBooleanValue(AutoReplaceOnFailure.Value);
 40            }
 041            if (HostId != null)
 42            {
 043                writer.WritePropertyName("hostId");
 044                writer.WriteStringValue(HostId);
 45            }
 046            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            }
 056            if (LicenseType != null)
 57            {
 058                writer.WritePropertyName("licenseType");
 059                writer.WriteStringValue(LicenseType.Value.ToSerialString());
 60            }
 061            if (ProvisioningTime != null)
 62            {
 063                writer.WritePropertyName("provisioningTime");
 064                writer.WriteStringValue(ProvisioningTime.Value, "O");
 65            }
 066            if (ProvisioningState != null)
 67            {
 068                writer.WritePropertyName("provisioningState");
 069                writer.WriteStringValue(ProvisioningState);
 70            }
 071            if (InstanceView != null)
 72            {
 073                writer.WritePropertyName("instanceView");
 074                writer.WriteObjectValue(InstanceView);
 75            }
 076            writer.WriteEndObject();
 077            writer.WriteEndObject();
 078        }
 79    }
 80}