< Summary

Class:Azure.ResourceManager.Compute.Models.DiskEncryptionSetUpdate
Assembly:Azure.ResourceManager.Compute
File(s):C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\DiskEncryptionSetUpdate.cs
C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\DiskEncryptionSetUpdate.Serialization.cs
Covered lines:17
Uncovered lines:7
Coverable lines:24
Total lines:74
Line coverage:70.8% (17 of 24)
Covered branches:5
Total branches:6
Branch coverage:83.3% (5 of 6)

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\DiskEncryptionSetUpdate.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> disk encryption set update resource. </summary>
 13    public partial class DiskEncryptionSetUpdate
 14    {
 15        /// <summary> Initializes a new instance of DiskEncryptionSetUpdate. </summary>
 416        public DiskEncryptionSetUpdate()
 17        {
 418        }
 19
 20        /// <summary> Initializes a new instance of DiskEncryptionSetUpdate. </summary>
 21        /// <param name="tags"> Resource tags. </param>
 22        /// <param name="activeKey"> Key Vault Key Url and vault id of KeK, KeK is optional and when provided is used to
 023        internal DiskEncryptionSetUpdate(IDictionary<string, string> tags, KeyVaultAndKeyReference activeKey)
 24        {
 025            Tags = tags;
 026            ActiveKey = activeKey;
 027        }
 28
 29        /// <summary> Resource tags. </summary>
 2030        public IDictionary<string, string> Tags { get; set; }
 31        /// <summary> Key Vault Key Url and vault id of KeK, KeK is optional and when provided is used to unwrap the enc
 032        public KeyVaultAndKeyReference ActiveKey { get; set; }
 33    }
 34}

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\DiskEncryptionSetUpdate.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 DiskEncryptionSetUpdate : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 817            writer.WriteStartObject();
 818            if (Tags != null)
 19            {
 820                writer.WritePropertyName("tags");
 821                writer.WriteStartObject();
 3222                foreach (var item in Tags)
 23                {
 824                    writer.WritePropertyName(item.Key);
 825                    writer.WriteStringValue(item.Value);
 26                }
 827                writer.WriteEndObject();
 28            }
 829            writer.WritePropertyName("properties");
 830            writer.WriteStartObject();
 831            if (ActiveKey != null)
 32            {
 033                writer.WritePropertyName("activeKey");
 034                writer.WriteObjectValue(ActiveKey);
 35            }
 836            writer.WriteEndObject();
 837            writer.WriteEndObject();
 838        }
 39    }
 40}