< Summary

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

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\ContainerServiceSshPublicKey.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;
 9
 10namespace Azure.ResourceManager.Compute.Models
 11{
 12    /// <summary> Contains information about SSH certificate public key data. </summary>
 13    public partial class ContainerServiceSshPublicKey
 14    {
 15        /// <summary> Initializes a new instance of ContainerServiceSshPublicKey. </summary>
 16        /// <param name="keyData"> Certificate public key used to authenticate with VMs through SSH. The certificate mus
 017        public ContainerServiceSshPublicKey(string keyData)
 18        {
 019            if (keyData == null)
 20            {
 021                throw new ArgumentNullException(nameof(keyData));
 22            }
 23
 024            KeyData = keyData;
 025        }
 26
 27        /// <summary> Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM f
 028        public string KeyData { get; set; }
 29    }
 30}

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\ContainerServiceSshPublicKey.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 ContainerServiceSshPublicKey : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            writer.WritePropertyName("keyData");
 019            writer.WriteStringValue(KeyData);
 020            writer.WriteEndObject();
 021        }
 22
 23        internal static ContainerServiceSshPublicKey DeserializeContainerServiceSshPublicKey(JsonElement element)
 24        {
 025            string keyData = default;
 026            foreach (var property in element.EnumerateObject())
 27            {
 028                if (property.NameEquals("keyData"))
 29                {
 030                    keyData = property.Value.GetString();
 31                    continue;
 32                }
 33            }
 034            return new ContainerServiceSshPublicKey(keyData);
 35        }
 36    }
 37}