< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_ForceUpdateTag()-0%100%
get_Publisher()-0%100%
get_Type()-0%100%
get_TypeHandlerVersion()-0%100%
get_AutoUpgradeMinorVersion()-0%100%
get_Settings()-0%100%
get_ProtectedSettings()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineExtensionUpdate.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> Describes a Virtual Machine Extension. </summary>
 13    public partial class VirtualMachineExtensionUpdate : UpdateResource
 14    {
 15        /// <summary> Initializes a new instance of VirtualMachineExtensionUpdate. </summary>
 016        public VirtualMachineExtensionUpdate()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of VirtualMachineExtensionUpdate. </summary>
 21        /// <param name="tags"> Resource tags. </param>
 22        /// <param name="forceUpdateTag"> How the extension handler should be forced to update even if the extension con
 23        /// <param name="publisher"> The name of the extension handler publisher. </param>
 24        /// <param name="type"> Specifies the type of the extension; an example is &quot;CustomScriptExtension&quot;. </
 25        /// <param name="typeHandlerVersion"> Specifies the version of the script handler. </param>
 26        /// <param name="autoUpgradeMinorVersion"> Indicates whether the extension should use a newer minor version if o
 27        /// <param name="settings"> Json formatted public settings for the extension. </param>
 28        /// <param name="protectedSettings"> The extension can contain either protectedSettings or protectedSettingsFrom
 029        internal VirtualMachineExtensionUpdate(IDictionary<string, string> tags, string forceUpdateTag, string publisher
 30        {
 031            ForceUpdateTag = forceUpdateTag;
 032            Publisher = publisher;
 033            Type = type;
 034            TypeHandlerVersion = typeHandlerVersion;
 035            AutoUpgradeMinorVersion = autoUpgradeMinorVersion;
 036            Settings = settings;
 037            ProtectedSettings = protectedSettings;
 038        }
 39
 40        /// <summary> How the extension handler should be forced to update even if the extension configuration has not c
 041        public string ForceUpdateTag { get; set; }
 42        /// <summary> The name of the extension handler publisher. </summary>
 043        public string Publisher { get; set; }
 44        /// <summary> Specifies the type of the extension; an example is &quot;CustomScriptExtension&quot;. </summary>
 045        public string Type { get; set; }
 46        /// <summary> Specifies the version of the script handler. </summary>
 047        public string TypeHandlerVersion { get; set; }
 48        /// <summary> Indicates whether the extension should use a newer minor version if one is available at deployment
 049        public bool? AutoUpgradeMinorVersion { get; set; }
 50        /// <summary> Json formatted public settings for the extension. </summary>
 051        public object Settings { get; set; }
 52        /// <summary> The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protecte
 053        public object ProtectedSettings { get; set; }
 54    }
 55}

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineExtensionUpdate.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 VirtualMachineExtensionUpdate : 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 (ForceUpdateTag != null)
 32            {
 033                writer.WritePropertyName("forceUpdateTag");
 034                writer.WriteStringValue(ForceUpdateTag);
 35            }
 036            if (Publisher != null)
 37            {
 038                writer.WritePropertyName("publisher");
 039                writer.WriteStringValue(Publisher);
 40            }
 041            if (Type != null)
 42            {
 043                writer.WritePropertyName("type");
 044                writer.WriteStringValue(Type);
 45            }
 046            if (TypeHandlerVersion != null)
 47            {
 048                writer.WritePropertyName("typeHandlerVersion");
 049                writer.WriteStringValue(TypeHandlerVersion);
 50            }
 051            if (AutoUpgradeMinorVersion != null)
 52            {
 053                writer.WritePropertyName("autoUpgradeMinorVersion");
 054                writer.WriteBooleanValue(AutoUpgradeMinorVersion.Value);
 55            }
 056            if (Settings != null)
 57            {
 058                writer.WritePropertyName("settings");
 059                writer.WriteObjectValue(Settings);
 60            }
 061            if (ProtectedSettings != null)
 62            {
 063                writer.WritePropertyName("protectedSettings");
 064                writer.WriteObjectValue(ProtectedSettings);
 65            }
 066            writer.WriteEndObject();
 067            writer.WriteEndObject();
 068        }
 69    }
 70}