< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_SourceVault()-0%100%
get_VaultCertificates()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeVaultSecretGroup(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VaultSecretGroup.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 set of certificates which are all in the same Key Vault. </summary>
 13    public partial class VaultSecretGroup
 14    {
 15        /// <summary> Initializes a new instance of VaultSecretGroup. </summary>
 016        public VaultSecretGroup()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of VaultSecretGroup. </summary>
 21        /// <param name="sourceVault"> The relative URL of the Key Vault containing all of the certificates in VaultCert
 22        /// <param name="vaultCertificates"> The list of key vault references in SourceVault which contain certificates.
 023        internal VaultSecretGroup(SubResource sourceVault, IList<VaultCertificate> vaultCertificates)
 24        {
 025            SourceVault = sourceVault;
 026            VaultCertificates = vaultCertificates;
 027        }
 28
 29        /// <summary> The relative URL of the Key Vault containing all of the certificates in VaultCertificates. </summa
 030        public SubResource SourceVault { get; set; }
 31        /// <summary> The list of key vault references in SourceVault which contain certificates. </summary>
 032        public IList<VaultCertificate> VaultCertificates { get; set; }
 33    }
 34}

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VaultSecretGroup.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 VaultSecretGroup : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            if (SourceVault != null)
 20            {
 021                writer.WritePropertyName("sourceVault");
 022                writer.WriteObjectValue(SourceVault);
 23            }
 024            if (VaultCertificates != null)
 25            {
 026                writer.WritePropertyName("vaultCertificates");
 027                writer.WriteStartArray();
 028                foreach (var item in VaultCertificates)
 29                {
 030                    writer.WriteObjectValue(item);
 31                }
 032                writer.WriteEndArray();
 33            }
 034            writer.WriteEndObject();
 035        }
 36
 37        internal static VaultSecretGroup DeserializeVaultSecretGroup(JsonElement element)
 38        {
 039            SubResource sourceVault = default;
 040            IList<VaultCertificate> vaultCertificates = default;
 041            foreach (var property in element.EnumerateObject())
 42            {
 043                if (property.NameEquals("sourceVault"))
 44                {
 045                    if (property.Value.ValueKind == JsonValueKind.Null)
 46                    {
 47                        continue;
 48                    }
 049                    sourceVault = SubResource.DeserializeSubResource(property.Value);
 050                    continue;
 51                }
 052                if (property.NameEquals("vaultCertificates"))
 53                {
 054                    if (property.Value.ValueKind == JsonValueKind.Null)
 55                    {
 56                        continue;
 57                    }
 058                    List<VaultCertificate> array = new List<VaultCertificate>();
 059                    foreach (var item in property.Value.EnumerateArray())
 60                    {
 061                        if (item.ValueKind == JsonValueKind.Null)
 62                        {
 063                            array.Add(null);
 64                        }
 65                        else
 66                        {
 067                            array.Add(VaultCertificate.DeserializeVaultCertificate(item));
 68                        }
 69                    }
 070                    vaultCertificates = array;
 71                    continue;
 72                }
 73            }
 074            return new VaultSecretGroup(sourceVault, vaultCertificates);
 75        }
 76    }
 77}