< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Protocol()-0%100%
get_CertificateUrl()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeWinRMListener(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\WinRMListener.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
 8namespace Azure.ResourceManager.Compute.Models
 9{
 10    /// <summary> Describes Protocol and thumbprint of Windows Remote Management listener. </summary>
 11    public partial class WinRMListener
 12    {
 13        /// <summary> Initializes a new instance of WinRMListener. </summary>
 014        public WinRMListener()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of WinRMListener. </summary>
 19        /// <param name="protocol"> Specifies the protocol of WinRM listener. &lt;br&gt;&lt;br&gt; Possible values are: 
 20        /// <param name="certificateUrl"> This is the URL of a certificate that has been uploaded to Key Vault as a secr
 021        internal WinRMListener(ProtocolTypes? protocol, string certificateUrl)
 22        {
 023            Protocol = protocol;
 024            CertificateUrl = certificateUrl;
 025        }
 26
 27        /// <summary> Specifies the protocol of WinRM listener. &lt;br&gt;&lt;br&gt; Possible values are: &lt;br&gt;**ht
 028        public ProtocolTypes? Protocol { get; set; }
 29        /// <summary> This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a sec
 030        public string CertificateUrl { get; set; }
 31    }
 32}

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\WinRMListener.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 WinRMListener : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            if (Protocol != null)
 19            {
 020                writer.WritePropertyName("protocol");
 021                writer.WriteStringValue(Protocol.Value.ToSerialString());
 22            }
 023            if (CertificateUrl != null)
 24            {
 025                writer.WritePropertyName("certificateUrl");
 026                writer.WriteStringValue(CertificateUrl);
 27            }
 028            writer.WriteEndObject();
 029        }
 30
 31        internal static WinRMListener DeserializeWinRMListener(JsonElement element)
 32        {
 033            ProtocolTypes? protocol = default;
 034            string certificateUrl = default;
 035            foreach (var property in element.EnumerateObject())
 36            {
 037                if (property.NameEquals("protocol"))
 38                {
 039                    if (property.Value.ValueKind == JsonValueKind.Null)
 40                    {
 41                        continue;
 42                    }
 043                    protocol = property.Value.GetString().ToProtocolTypes();
 044                    continue;
 45                }
 046                if (property.NameEquals("certificateUrl"))
 47                {
 048                    if (property.Value.ValueKind == JsonValueKind.Null)
 49                    {
 50                        continue;
 51                    }
 052                    certificateUrl = property.Value.GetString();
 53                    continue;
 54                }
 55            }
 056            return new WinRMListener(protocol, certificateUrl);
 57        }
 58    }
 59}