< Summary

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

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineScaleSetExtensionUpdate.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 Scale Set Extension. </summary>
 13    public partial class VirtualMachineScaleSetExtensionUpdate : SubResourceReadOnly
 14    {
 15        /// <summary> Initializes a new instance of VirtualMachineScaleSetExtensionUpdate. </summary>
 016        public VirtualMachineScaleSetExtensionUpdate()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of VirtualMachineScaleSetExtensionUpdate. </summary>
 21        /// <param name="id"> Resource Id. </param>
 22        /// <param name="name"> The name of the extension. </param>
 23        /// <param name="type"> Resource type. </param>
 24        /// <param name="forceUpdateTag"> If a value is provided and is different from the previous value, the extension
 25        /// <param name="publisher"> The name of the extension handler publisher. </param>
 26        /// <param name="typePropertiesType"> Specifies the type of the extension; an example is &quot;CustomScriptExten
 27        /// <param name="typeHandlerVersion"> Specifies the version of the script handler. </param>
 28        /// <param name="autoUpgradeMinorVersion"> Indicates whether the extension should use a newer minor version if o
 29        /// <param name="settings"> Json formatted public settings for the extension. </param>
 30        /// <param name="protectedSettings"> The extension can contain either protectedSettings or protectedSettingsFrom
 31        /// <param name="provisioningState"> The provisioning state, which only appears in the response. </param>
 32        /// <param name="provisionAfterExtensions"> Collection of extension names after which this extension needs to be
 033        internal VirtualMachineScaleSetExtensionUpdate(string id, string name, string type, string forceUpdateTag, strin
 34        {
 035            Name = name;
 036            Type = type;
 037            ForceUpdateTag = forceUpdateTag;
 038            Publisher = publisher;
 039            TypePropertiesType = typePropertiesType;
 040            TypeHandlerVersion = typeHandlerVersion;
 041            AutoUpgradeMinorVersion = autoUpgradeMinorVersion;
 042            Settings = settings;
 043            ProtectedSettings = protectedSettings;
 044            ProvisioningState = provisioningState;
 045            ProvisionAfterExtensions = provisionAfterExtensions;
 046        }
 47
 48        /// <summary> The name of the extension. </summary>
 049        public string Name { get; }
 50        /// <summary> Resource type. </summary>
 051        public string Type { get; }
 52        /// <summary> If a value is provided and is different from the previous value, the extension handler will be for
 053        public string ForceUpdateTag { get; set; }
 54        /// <summary> The name of the extension handler publisher. </summary>
 055        public string Publisher { get; set; }
 56        /// <summary> Specifies the type of the extension; an example is &quot;CustomScriptExtension&quot;. </summary>
 057        public string TypePropertiesType { get; set; }
 58        /// <summary> Specifies the version of the script handler. </summary>
 059        public string TypeHandlerVersion { get; set; }
 60        /// <summary> Indicates whether the extension should use a newer minor version if one is available at deployment
 061        public bool? AutoUpgradeMinorVersion { get; set; }
 62        /// <summary> Json formatted public settings for the extension. </summary>
 063        public object Settings { get; set; }
 64        /// <summary> The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protecte
 065        public object ProtectedSettings { get; set; }
 66        /// <summary> The provisioning state, which only appears in the response. </summary>
 067        public string ProvisioningState { get; }
 68        /// <summary> Collection of extension names after which this extension needs to be provisioned. </summary>
 069        public IList<string> ProvisionAfterExtensions { get; set; }
 70    }
 71}

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineScaleSetExtensionUpdate.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.Collections.Generic;
 9using System.Text.Json;
 10using Azure.Core;
 11
 12namespace Azure.ResourceManager.Compute.Models
 13{
 14    public partial class VirtualMachineScaleSetExtensionUpdate : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            if (Name != null)
 20            {
 021                writer.WritePropertyName("name");
 022                writer.WriteStringValue(Name);
 23            }
 024            if (Type != null)
 25            {
 026                writer.WritePropertyName("type");
 027                writer.WriteStringValue(Type);
 28            }
 029            if (Id != null)
 30            {
 031                writer.WritePropertyName("id");
 032                writer.WriteStringValue(Id);
 33            }
 034            writer.WritePropertyName("properties");
 035            writer.WriteStartObject();
 036            if (ForceUpdateTag != null)
 37            {
 038                writer.WritePropertyName("forceUpdateTag");
 039                writer.WriteStringValue(ForceUpdateTag);
 40            }
 041            if (Publisher != null)
 42            {
 043                writer.WritePropertyName("publisher");
 044                writer.WriteStringValue(Publisher);
 45            }
 046            if (TypePropertiesType != null)
 47            {
 048                writer.WritePropertyName("type");
 049                writer.WriteStringValue(TypePropertiesType);
 50            }
 051            if (TypeHandlerVersion != null)
 52            {
 053                writer.WritePropertyName("typeHandlerVersion");
 054                writer.WriteStringValue(TypeHandlerVersion);
 55            }
 056            if (AutoUpgradeMinorVersion != null)
 57            {
 058                writer.WritePropertyName("autoUpgradeMinorVersion");
 059                writer.WriteBooleanValue(AutoUpgradeMinorVersion.Value);
 60            }
 061            if (Settings != null)
 62            {
 063                writer.WritePropertyName("settings");
 064                writer.WriteObjectValue(Settings);
 65            }
 066            if (ProtectedSettings != null)
 67            {
 068                writer.WritePropertyName("protectedSettings");
 069                writer.WriteObjectValue(ProtectedSettings);
 70            }
 071            if (ProvisioningState != null)
 72            {
 073                writer.WritePropertyName("provisioningState");
 074                writer.WriteStringValue(ProvisioningState);
 75            }
 076            if (ProvisionAfterExtensions != null)
 77            {
 078                writer.WritePropertyName("provisionAfterExtensions");
 079                writer.WriteStartArray();
 080                foreach (var item in ProvisionAfterExtensions)
 81                {
 082                    writer.WriteStringValue(item);
 83                }
 084                writer.WriteEndArray();
 85            }
 086            writer.WriteEndObject();
 087            writer.WriteEndObject();
 088        }
 89
 90        internal static VirtualMachineScaleSetExtensionUpdate DeserializeVirtualMachineScaleSetExtensionUpdate(JsonEleme
 91        {
 092            string name = default;
 093            string type = default;
 094            string id = default;
 095            string forceUpdateTag = default;
 096            string publisher = default;
 097            string type0 = default;
 098            string typeHandlerVersion = default;
 099            bool? autoUpgradeMinorVersion = default;
 0100            object settings = default;
 0101            object protectedSettings = default;
 0102            string provisioningState = default;
 0103            IList<string> provisionAfterExtensions = default;
 0104            foreach (var property in element.EnumerateObject())
 105            {
 0106                if (property.NameEquals("name"))
 107                {
 0108                    if (property.Value.ValueKind == JsonValueKind.Null)
 109                    {
 110                        continue;
 111                    }
 0112                    name = property.Value.GetString();
 0113                    continue;
 114                }
 0115                if (property.NameEquals("type"))
 116                {
 0117                    if (property.Value.ValueKind == JsonValueKind.Null)
 118                    {
 119                        continue;
 120                    }
 0121                    type = property.Value.GetString();
 0122                    continue;
 123                }
 0124                if (property.NameEquals("id"))
 125                {
 0126                    if (property.Value.ValueKind == JsonValueKind.Null)
 127                    {
 128                        continue;
 129                    }
 0130                    id = property.Value.GetString();
 0131                    continue;
 132                }
 0133                if (property.NameEquals("properties"))
 134                {
 0135                    foreach (var property0 in property.Value.EnumerateObject())
 136                    {
 0137                        if (property0.NameEquals("forceUpdateTag"))
 138                        {
 0139                            if (property0.Value.ValueKind == JsonValueKind.Null)
 140                            {
 141                                continue;
 142                            }
 0143                            forceUpdateTag = property0.Value.GetString();
 0144                            continue;
 145                        }
 0146                        if (property0.NameEquals("publisher"))
 147                        {
 0148                            if (property0.Value.ValueKind == JsonValueKind.Null)
 149                            {
 150                                continue;
 151                            }
 0152                            publisher = property0.Value.GetString();
 0153                            continue;
 154                        }
 0155                        if (property0.NameEquals("type"))
 156                        {
 0157                            if (property0.Value.ValueKind == JsonValueKind.Null)
 158                            {
 159                                continue;
 160                            }
 0161                            type0 = property0.Value.GetString();
 0162                            continue;
 163                        }
 0164                        if (property0.NameEquals("typeHandlerVersion"))
 165                        {
 0166                            if (property0.Value.ValueKind == JsonValueKind.Null)
 167                            {
 168                                continue;
 169                            }
 0170                            typeHandlerVersion = property0.Value.GetString();
 0171                            continue;
 172                        }
 0173                        if (property0.NameEquals("autoUpgradeMinorVersion"))
 174                        {
 0175                            if (property0.Value.ValueKind == JsonValueKind.Null)
 176                            {
 177                                continue;
 178                            }
 0179                            autoUpgradeMinorVersion = property0.Value.GetBoolean();
 0180                            continue;
 181                        }
 0182                        if (property0.NameEquals("settings"))
 183                        {
 0184                            if (property0.Value.ValueKind == JsonValueKind.Null)
 185                            {
 186                                continue;
 187                            }
 0188                            settings = property0.Value.GetObject();
 0189                            continue;
 190                        }
 0191                        if (property0.NameEquals("protectedSettings"))
 192                        {
 0193                            if (property0.Value.ValueKind == JsonValueKind.Null)
 194                            {
 195                                continue;
 196                            }
 0197                            protectedSettings = property0.Value.GetObject();
 0198                            continue;
 199                        }
 0200                        if (property0.NameEquals("provisioningState"))
 201                        {
 0202                            if (property0.Value.ValueKind == JsonValueKind.Null)
 203                            {
 204                                continue;
 205                            }
 0206                            provisioningState = property0.Value.GetString();
 0207                            continue;
 208                        }
 0209                        if (property0.NameEquals("provisionAfterExtensions"))
 210                        {
 0211                            if (property0.Value.ValueKind == JsonValueKind.Null)
 212                            {
 213                                continue;
 214                            }
 0215                            List<string> array = new List<string>();
 0216                            foreach (var item in property0.Value.EnumerateArray())
 217                            {
 0218                                if (item.ValueKind == JsonValueKind.Null)
 219                                {
 0220                                    array.Add(null);
 221                                }
 222                                else
 223                                {
 0224                                    array.Add(item.GetString());
 225                                }
 226                            }
 0227                            provisionAfterExtensions = array;
 228                            continue;
 229                        }
 230                    }
 231                    continue;
 232                }
 233            }
 0234            return new VirtualMachineScaleSetExtensionUpdate(id, name, type, forceUpdateTag, publisher, type0, typeHandl
 235        }
 236    }
 237}