< Summary

Class:Azure.ResourceManager.Network.Models.RadiusServer
Assembly:Azure.ResourceManager.Network
File(s):C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\RadiusServer.cs
C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\RadiusServer.Serialization.cs
Covered lines:0
Uncovered lines:39
Coverable lines:39
Total lines:112
Line coverage:0% (0 of 39)
Covered branches:0
Total branches:18
Branch coverage:0% (0 of 18)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
.ctor(...)-0%100%
get_RadiusServerAddress()-0%100%
get_RadiusServerScore()-0%100%
get_RadiusServerSecret()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeRadiusServer(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\RadiusServer.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.Network.Models
 11{
 12    /// <summary> Radius Server Settings. </summary>
 13    public partial class RadiusServer
 14    {
 15        /// <summary> Initializes a new instance of RadiusServer. </summary>
 16        /// <param name="radiusServerAddress"> The address of this radius server. </param>
 017        public RadiusServer(string radiusServerAddress)
 18        {
 019            if (radiusServerAddress == null)
 20            {
 021                throw new ArgumentNullException(nameof(radiusServerAddress));
 22            }
 23
 024            RadiusServerAddress = radiusServerAddress;
 025        }
 26
 27        /// <summary> Initializes a new instance of RadiusServer. </summary>
 28        /// <param name="radiusServerAddress"> The address of this radius server. </param>
 29        /// <param name="radiusServerScore"> The initial score assigned to this radius server. </param>
 30        /// <param name="radiusServerSecret"> The secret used for this radius server. </param>
 031        internal RadiusServer(string radiusServerAddress, long? radiusServerScore, string radiusServerSecret)
 32        {
 033            RadiusServerAddress = radiusServerAddress;
 034            RadiusServerScore = radiusServerScore;
 035            RadiusServerSecret = radiusServerSecret;
 036        }
 37
 38        /// <summary> The address of this radius server. </summary>
 039        public string RadiusServerAddress { get; set; }
 40        /// <summary> The initial score assigned to this radius server. </summary>
 041        public long? RadiusServerScore { get; set; }
 42        /// <summary> The secret used for this radius server. </summary>
 043        public string RadiusServerSecret { get; set; }
 44    }
 45}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\RadiusServer.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.Network.Models
 12{
 13    public partial class RadiusServer : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            writer.WritePropertyName("radiusServerAddress");
 019            writer.WriteStringValue(RadiusServerAddress);
 020            if (RadiusServerScore != null)
 21            {
 022                writer.WritePropertyName("radiusServerScore");
 023                writer.WriteNumberValue(RadiusServerScore.Value);
 24            }
 025            if (RadiusServerSecret != null)
 26            {
 027                writer.WritePropertyName("radiusServerSecret");
 028                writer.WriteStringValue(RadiusServerSecret);
 29            }
 030            writer.WriteEndObject();
 031        }
 32
 33        internal static RadiusServer DeserializeRadiusServer(JsonElement element)
 34        {
 035            string radiusServerAddress = default;
 036            long? radiusServerScore = default;
 037            string radiusServerSecret = default;
 038            foreach (var property in element.EnumerateObject())
 39            {
 040                if (property.NameEquals("radiusServerAddress"))
 41                {
 042                    radiusServerAddress = property.Value.GetString();
 043                    continue;
 44                }
 045                if (property.NameEquals("radiusServerScore"))
 46                {
 047                    if (property.Value.ValueKind == JsonValueKind.Null)
 48                    {
 49                        continue;
 50                    }
 051                    radiusServerScore = property.Value.GetInt64();
 052                    continue;
 53                }
 054                if (property.NameEquals("radiusServerSecret"))
 55                {
 056                    if (property.Value.ValueKind == JsonValueKind.Null)
 57                    {
 58                        continue;
 59                    }
 060                    radiusServerSecret = property.Value.GetString();
 61                    continue;
 62                }
 63            }
 064            return new RadiusServer(radiusServerAddress, radiusServerScore, radiusServerSecret);
 65        }
 66    }
 67}