< Summary

Class:Azure.ResourceManager.Resources.Models.DeploymentExtended
Assembly:Azure.ResourceManager.Resources
File(s):C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\DeploymentExtended.cs
C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\DeploymentExtended.Serialization.cs
Covered lines:47
Uncovered lines:5
Coverable lines:52
Total lines:146
Line coverage:90.3% (47 of 52)
Covered branches:29
Total branches:30
Branch coverage:96.6% (29 of 30)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_Id()-100%100%
get_Name()-100%100%
get_Type()-0%100%
get_Location()-0%100%
get_Properties()-100%100%
get_Tags()-100%100%
DeserializeDeploymentExtended(...)-97.22%96.67%

File(s)

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\DeploymentExtended.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 information. </summary>
 13    public partial class DeploymentExtended
 14    {
 15        /// <summary> Initializes a new instance of DeploymentExtended. </summary>
 016        internal DeploymentExtended()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of DeploymentExtended. </summary>
 21        /// <param name="id"> The ID of the deployment. </param>
 22        /// <param name="name"> The name of the deployment. </param>
 23        /// <param name="type"> The type of the deployment. </param>
 24        /// <param name="location"> the location of the deployment. </param>
 25        /// <param name="properties"> Deployment properties. </param>
 26        /// <param name="tags"> Deployment tags. </param>
 10427        internal DeploymentExtended(string id, string name, string type, string location, DeploymentPropertiesExtended p
 28        {
 10429            Id = id;
 10430            Name = name;
 10431            Type = type;
 10432            Location = location;
 10433            Properties = properties;
 10434            Tags = tags;
 10435        }
 36
 37        /// <summary> The ID of the deployment. </summary>
 1638        public string Id { get; }
 39        /// <summary> The name of the deployment. </summary>
 3640        public string Name { get; }
 41        /// <summary> The type of the deployment. </summary>
 042        public string Type { get; }
 43        /// <summary> the location of the deployment. </summary>
 044        public string Location { get; }
 45        /// <summary> Deployment properties. </summary>
 18846        public DeploymentPropertiesExtended Properties { get; }
 47        /// <summary> Deployment tags. </summary>
 6048        public IReadOnlyDictionary<string, string> Tags { get; }
 49    }
 50}

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\DeploymentExtended.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 DeploymentExtended
 15    {
 16        internal static DeploymentExtended DeserializeDeploymentExtended(JsonElement element)
 17        {
 10418            string id = default;
 10419            string name = default;
 10420            string type = default;
 10421            string location = default;
 10422            DeploymentPropertiesExtended properties = default;
 10423            IReadOnlyDictionary<string, string> tags = default;
 116024            foreach (var property in element.EnumerateObject())
 25            {
 47626                if (property.NameEquals("id"))
 27                {
 8428                    if (property.Value.ValueKind == JsonValueKind.Null)
 29                    {
 30                        continue;
 31                    }
 8432                    id = property.Value.GetString();
 8433                    continue;
 34                }
 39235                if (property.NameEquals("name"))
 36                {
 10437                    if (property.Value.ValueKind == JsonValueKind.Null)
 38                    {
 39                        continue;
 40                    }
 10441                    name = property.Value.GetString();
 10442                    continue;
 43                }
 28844                if (property.NameEquals("type"))
 45                {
 7246                    if (property.Value.ValueKind == JsonValueKind.Null)
 47                    {
 48                        continue;
 49                    }
 7250                    type = property.Value.GetString();
 7251                    continue;
 52                }
 21653                if (property.NameEquals("location"))
 54                {
 3655                    if (property.Value.ValueKind == JsonValueKind.Null)
 56                    {
 57                        continue;
 58                    }
 3659                    location = property.Value.GetString();
 3660                    continue;
 61                }
 18062                if (property.NameEquals("properties"))
 63                {
 10464                    if (property.Value.ValueKind == JsonValueKind.Null)
 65                    {
 66                        continue;
 67                    }
 10468                    properties = DeploymentPropertiesExtended.DeserializeDeploymentPropertiesExtended(property.Value);
 10469                    continue;
 70                }
 7671                if (property.NameEquals("tags"))
 72                {
 5673                    if (property.Value.ValueKind == JsonValueKind.Null)
 74                    {
 75                        continue;
 76                    }
 5677                    Dictionary<string, string> dictionary = new Dictionary<string, string>();
 22478                    foreach (var property0 in property.Value.EnumerateObject())
 79                    {
 5680                        if (property0.Value.ValueKind == JsonValueKind.Null)
 81                        {
 082                            dictionary.Add(property0.Name, null);
 83                        }
 84                        else
 85                        {
 5686                            dictionary.Add(property0.Name, property0.Value.GetString());
 87                        }
 88                    }
 5689                    tags = dictionary;
 90                    continue;
 91                }
 92            }
 10493            return new DeploymentExtended(id, name, type, location, properties, tags);
 94        }
 95    }
 96}