< Summary

Class:Azure.ResourceManager.Resources.Models.ResourceGroupPatchable
Assembly:Azure.ResourceManager.Resources
File(s):C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\ResourceGroupPatchable.cs
C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\ResourceGroupPatchable.Serialization.cs
Covered lines:12
Uncovered lines:19
Coverable lines:31
Total lines:89
Line coverage:38.7% (12 of 31)
Covered branches:5
Total branches:10
Branch coverage:50% (5 of 10)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-100%100%
.ctor(...)-0%100%
get_Name()-100%100%
get_Properties()-0%100%
get_ManagedBy()-0%100%
get_Tags()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-47.37%50%

File(s)

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\ResourceGroupPatchable.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> Resource group information. </summary>
 13    public partial class ResourceGroupPatchable
 14    {
 15        /// <summary> Initializes a new instance of ResourceGroupPatchable. </summary>
 416        public ResourceGroupPatchable()
 17        {
 418        }
 19
 20        /// <summary> Initializes a new instance of ResourceGroupPatchable. </summary>
 21        /// <param name="name"> The name of the resource group. </param>
 22        /// <param name="properties"> The resource group properties. </param>
 23        /// <param name="managedBy"> The ID of the resource that manages this resource group. </param>
 24        /// <param name="tags"> The tags attached to the resource group. </param>
 025        internal ResourceGroupPatchable(string name, ResourceGroupProperties properties, string managedBy, IDictionary<s
 26        {
 027            Name = name;
 028            Properties = properties;
 029            ManagedBy = managedBy;
 030            Tags = tags;
 031        }
 32
 33        /// <summary> The name of the resource group. </summary>
 1234        public string Name { get; set; }
 35        /// <summary> The resource group properties. </summary>
 036        public ResourceGroupProperties Properties { get; set; }
 37        /// <summary> The ID of the resource that manages this resource group. </summary>
 038        public string ManagedBy { get; set; }
 39        /// <summary> The tags attached to the resource group. </summary>
 040        public IDictionary<string, string> Tags { get; set; }
 41    }
 42}

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\ResourceGroupPatchable.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.Resources.Models
 12{
 13    public partial class ResourceGroupPatchable : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 417            writer.WriteStartObject();
 418            if (Name != null)
 19            {
 420                writer.WritePropertyName("name");
 421                writer.WriteStringValue(Name);
 22            }
 423            if (Properties != null)
 24            {
 025                writer.WritePropertyName("properties");
 026                writer.WriteObjectValue(Properties);
 27            }
 428            if (ManagedBy != null)
 29            {
 030                writer.WritePropertyName("managedBy");
 031                writer.WriteStringValue(ManagedBy);
 32            }
 433            if (Tags != null)
 34            {
 035                writer.WritePropertyName("tags");
 036                writer.WriteStartObject();
 037                foreach (var item in Tags)
 38                {
 039                    writer.WritePropertyName(item.Key);
 040                    writer.WriteStringValue(item.Value);
 41                }
 042                writer.WriteEndObject();
 43            }
 444            writer.WriteEndObject();
 445        }
 46    }
 47}