< Summary

Class:Azure.ResourceManager.Resources.Models.DeploymentScriptUpdateParameter
Assembly:Azure.ResourceManager.Resources
File(s):C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\DeploymentScriptUpdateParameter.cs
C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\DeploymentScriptUpdateParameter.Serialization.cs
Covered lines:0
Uncovered lines:51
Coverable lines:51
Total lines:141
Line coverage:0% (0 of 51)
Covered branches:0
Total branches:32
Branch coverage:0% (0 of 32)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Tags()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeDeploymentScriptUpdateParameter(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\DeploymentScriptUpdateParameter.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.Resources.Models
 11{
 12    /// <summary> Deployment script parameters to be updated. </summary>
 13    public partial class DeploymentScriptUpdateParameter : AzureResourceBase
 14    {
 15        /// <summary> Initializes a new instance of DeploymentScriptUpdateParameter. </summary>
 016        public DeploymentScriptUpdateParameter()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of DeploymentScriptUpdateParameter. </summary>
 21        /// <param name="id"> String Id used to locate any resource on Azure. </param>
 22        /// <param name="name"> Name of this resource. </param>
 23        /// <param name="type"> Type of this resource. </param>
 24        /// <param name="tags"> Resource tags to be updated. </param>
 025        internal DeploymentScriptUpdateParameter(string id, string name, string type, IDictionary<string, string> tags) 
 26        {
 027            Tags = tags;
 028        }
 29
 30        /// <summary> Resource tags to be updated. </summary>
 031        public IDictionary<string, string> Tags { get; set; }
 32    }
 33}

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\DeploymentScriptUpdateParameter.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.Resources.Models
 13{
 14    public partial class DeploymentScriptUpdateParameter : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            if (Tags != null)
 20            {
 021                writer.WritePropertyName("tags");
 022                writer.WriteStartObject();
 023                foreach (var item in Tags)
 24                {
 025                    writer.WritePropertyName(item.Key);
 026                    writer.WriteStringValue(item.Value);
 27                }
 028                writer.WriteEndObject();
 29            }
 030            if (Id != null)
 31            {
 032                writer.WritePropertyName("id");
 033                writer.WriteStringValue(Id);
 34            }
 035            if (Name != null)
 36            {
 037                writer.WritePropertyName("name");
 038                writer.WriteStringValue(Name);
 39            }
 040            if (Type != null)
 41            {
 042                writer.WritePropertyName("type");
 043                writer.WriteStringValue(Type);
 44            }
 045            writer.WriteEndObject();
 046        }
 47
 48        internal static DeploymentScriptUpdateParameter DeserializeDeploymentScriptUpdateParameter(JsonElement element)
 49        {
 050            IDictionary<string, string> tags = default;
 051            string id = default;
 052            string name = default;
 053            string type = default;
 054            foreach (var property in element.EnumerateObject())
 55            {
 056                if (property.NameEquals("tags"))
 57                {
 058                    if (property.Value.ValueKind == JsonValueKind.Null)
 59                    {
 60                        continue;
 61                    }
 062                    Dictionary<string, string> dictionary = new Dictionary<string, string>();
 063                    foreach (var property0 in property.Value.EnumerateObject())
 64                    {
 065                        if (property0.Value.ValueKind == JsonValueKind.Null)
 66                        {
 067                            dictionary.Add(property0.Name, null);
 68                        }
 69                        else
 70                        {
 071                            dictionary.Add(property0.Name, property0.Value.GetString());
 72                        }
 73                    }
 074                    tags = dictionary;
 075                    continue;
 76                }
 077                if (property.NameEquals("id"))
 78                {
 079                    if (property.Value.ValueKind == JsonValueKind.Null)
 80                    {
 81                        continue;
 82                    }
 083                    id = property.Value.GetString();
 084                    continue;
 85                }
 086                if (property.NameEquals("name"))
 87                {
 088                    if (property.Value.ValueKind == JsonValueKind.Null)
 89                    {
 90                        continue;
 91                    }
 092                    name = property.Value.GetString();
 093                    continue;
 94                }
 095                if (property.NameEquals("type"))
 96                {
 097                    if (property.Value.ValueKind == JsonValueKind.Null)
 98                    {
 99                        continue;
 100                    }
 0101                    type = property.Value.GetString();
 102                    continue;
 103                }
 104            }
 0105            return new DeploymentScriptUpdateParameter(id, name, type, tags);
 106        }
 107    }
 108}