< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Etag()-0%100%
get_LoadBalancerFrontendIpConfigurations()-0%100%
get_IpConfigurations()-0%100%
get_NetworkInterfaces()-0%100%
get_ProvisioningState()-0%100%
get_PrivateEndpointConnections()-0%100%
get_Visibility()-0%100%
get_AutoApproval()-0%100%
get_Fqdns()-0%100%
get_Alias()-0%100%
get_EnableProxyProtocol()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializePrivateLinkService(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\PrivateLinkService.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.Network.Models
 11{
 12    /// <summary> Private link service resource. </summary>
 13    public partial class PrivateLinkService : Resource
 14    {
 15        /// <summary> Initializes a new instance of PrivateLinkService. </summary>
 016        public PrivateLinkService()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of PrivateLinkService. </summary>
 21        /// <param name="id"> Resource ID. </param>
 22        /// <param name="name"> Resource name. </param>
 23        /// <param name="type"> Resource type. </param>
 24        /// <param name="location"> Resource location. </param>
 25        /// <param name="tags"> Resource tags. </param>
 26        /// <param name="etag"> A unique read-only string that changes whenever the resource is updated. </param>
 27        /// <param name="loadBalancerFrontendIpConfigurations"> An array of references to the load balancer IP configura
 28        /// <param name="ipConfigurations"> An array of private link service IP configurations. </param>
 29        /// <param name="networkInterfaces"> An array of references to the network interfaces created for this private l
 30        /// <param name="provisioningState"> The provisioning state of the private link service resource. </param>
 31        /// <param name="privateEndpointConnections"> An array of list about connections to the private endpoint. </para
 32        /// <param name="visibility"> The visibility list of the private link service. </param>
 33        /// <param name="autoApproval"> The auto-approval list of the private link service. </param>
 34        /// <param name="fqdns"> The list of Fqdn. </param>
 35        /// <param name="alias"> The alias of the private link service. </param>
 36        /// <param name="enableProxyProtocol"> Whether the private link service is enabled for proxy protocol or not. </
 037        internal PrivateLinkService(string id, string name, string type, string location, IDictionary<string, string> ta
 38        {
 039            Etag = etag;
 040            LoadBalancerFrontendIpConfigurations = loadBalancerFrontendIpConfigurations;
 041            IpConfigurations = ipConfigurations;
 042            NetworkInterfaces = networkInterfaces;
 043            ProvisioningState = provisioningState;
 044            PrivateEndpointConnections = privateEndpointConnections;
 045            Visibility = visibility;
 046            AutoApproval = autoApproval;
 047            Fqdns = fqdns;
 048            Alias = @alias;
 049            EnableProxyProtocol = enableProxyProtocol;
 050        }
 51
 52        /// <summary> A unique read-only string that changes whenever the resource is updated. </summary>
 053        public string Etag { get; }
 54        /// <summary> An array of references to the load balancer IP configurations. </summary>
 055        public IList<FrontendIPConfiguration> LoadBalancerFrontendIpConfigurations { get; set; }
 56        /// <summary> An array of private link service IP configurations. </summary>
 057        public IList<PrivateLinkServiceIpConfiguration> IpConfigurations { get; set; }
 58        /// <summary> An array of references to the network interfaces created for this private link service. </summary>
 059        public IList<NetworkInterface> NetworkInterfaces { get; }
 60        /// <summary> The provisioning state of the private link service resource. </summary>
 061        public ProvisioningState? ProvisioningState { get; }
 62        /// <summary> An array of list about connections to the private endpoint. </summary>
 063        public IList<PrivateEndpointConnection> PrivateEndpointConnections { get; }
 64        /// <summary> The visibility list of the private link service. </summary>
 065        public ResourceSet Visibility { get; set; }
 66        /// <summary> The auto-approval list of the private link service. </summary>
 067        public ResourceSet AutoApproval { get; set; }
 68        /// <summary> The list of Fqdn. </summary>
 069        public IList<string> Fqdns { get; set; }
 70        /// <summary> The alias of the private link service. </summary>
 071        public string Alias { get; }
 72        /// <summary> Whether the private link service is enabled for proxy protocol or not. </summary>
 073        public bool? EnableProxyProtocol { get; set; }
 74    }
 75}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\PrivateLinkService.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.Network.Models
 13{
 14    public partial class PrivateLinkService : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            if (Etag != null)
 20            {
 021                writer.WritePropertyName("etag");
 022                writer.WriteStringValue(Etag);
 23            }
 024            if (Id != null)
 25            {
 026                writer.WritePropertyName("id");
 027                writer.WriteStringValue(Id);
 28            }
 029            if (Name != null)
 30            {
 031                writer.WritePropertyName("name");
 032                writer.WriteStringValue(Name);
 33            }
 034            if (Type != null)
 35            {
 036                writer.WritePropertyName("type");
 037                writer.WriteStringValue(Type);
 38            }
 039            if (Location != null)
 40            {
 041                writer.WritePropertyName("location");
 042                writer.WriteStringValue(Location);
 43            }
 044            if (Tags != null)
 45            {
 046                writer.WritePropertyName("tags");
 047                writer.WriteStartObject();
 048                foreach (var item in Tags)
 49                {
 050                    writer.WritePropertyName(item.Key);
 051                    writer.WriteStringValue(item.Value);
 52                }
 053                writer.WriteEndObject();
 54            }
 055            writer.WritePropertyName("properties");
 056            writer.WriteStartObject();
 057            if (LoadBalancerFrontendIpConfigurations != null)
 58            {
 059                writer.WritePropertyName("loadBalancerFrontendIpConfigurations");
 060                writer.WriteStartArray();
 061                foreach (var item in LoadBalancerFrontendIpConfigurations)
 62                {
 063                    writer.WriteObjectValue(item);
 64                }
 065                writer.WriteEndArray();
 66            }
 067            if (IpConfigurations != null)
 68            {
 069                writer.WritePropertyName("ipConfigurations");
 070                writer.WriteStartArray();
 071                foreach (var item in IpConfigurations)
 72                {
 073                    writer.WriteObjectValue(item);
 74                }
 075                writer.WriteEndArray();
 76            }
 077            if (NetworkInterfaces != null)
 78            {
 079                writer.WritePropertyName("networkInterfaces");
 080                writer.WriteStartArray();
 081                foreach (var item in NetworkInterfaces)
 82                {
 083                    writer.WriteObjectValue(item);
 84                }
 085                writer.WriteEndArray();
 86            }
 087            if (ProvisioningState != null)
 88            {
 089                writer.WritePropertyName("provisioningState");
 090                writer.WriteStringValue(ProvisioningState.Value.ToString());
 91            }
 092            if (PrivateEndpointConnections != null)
 93            {
 094                writer.WritePropertyName("privateEndpointConnections");
 095                writer.WriteStartArray();
 096                foreach (var item in PrivateEndpointConnections)
 97                {
 098                    writer.WriteObjectValue(item);
 99                }
 0100                writer.WriteEndArray();
 101            }
 0102            if (Visibility != null)
 103            {
 0104                writer.WritePropertyName("visibility");
 0105                writer.WriteObjectValue(Visibility);
 106            }
 0107            if (AutoApproval != null)
 108            {
 0109                writer.WritePropertyName("autoApproval");
 0110                writer.WriteObjectValue(AutoApproval);
 111            }
 0112            if (Fqdns != null)
 113            {
 0114                writer.WritePropertyName("fqdns");
 0115                writer.WriteStartArray();
 0116                foreach (var item in Fqdns)
 117                {
 0118                    writer.WriteStringValue(item);
 119                }
 0120                writer.WriteEndArray();
 121            }
 0122            if (Alias != null)
 123            {
 0124                writer.WritePropertyName("alias");
 0125                writer.WriteStringValue(Alias);
 126            }
 0127            if (EnableProxyProtocol != null)
 128            {
 0129                writer.WritePropertyName("enableProxyProtocol");
 0130                writer.WriteBooleanValue(EnableProxyProtocol.Value);
 131            }
 0132            writer.WriteEndObject();
 0133            writer.WriteEndObject();
 0134        }
 135
 136        internal static PrivateLinkService DeserializePrivateLinkService(JsonElement element)
 137        {
 0138            string etag = default;
 0139            string id = default;
 0140            string name = default;
 0141            string type = default;
 0142            string location = default;
 0143            IDictionary<string, string> tags = default;
 0144            IList<FrontendIPConfiguration> loadBalancerFrontendIpConfigurations = default;
 0145            IList<PrivateLinkServiceIpConfiguration> ipConfigurations = default;
 0146            IList<NetworkInterface> networkInterfaces = default;
 0147            ProvisioningState? provisioningState = default;
 0148            IList<PrivateEndpointConnection> privateEndpointConnections = default;
 0149            ResourceSet visibility = default;
 0150            ResourceSet autoApproval = default;
 0151            IList<string> fqdns = default;
 0152            string @alias = default;
 0153            bool? enableProxyProtocol = default;
 0154            foreach (var property in element.EnumerateObject())
 155            {
 0156                if (property.NameEquals("etag"))
 157                {
 0158                    if (property.Value.ValueKind == JsonValueKind.Null)
 159                    {
 160                        continue;
 161                    }
 0162                    etag = property.Value.GetString();
 0163                    continue;
 164                }
 0165                if (property.NameEquals("id"))
 166                {
 0167                    if (property.Value.ValueKind == JsonValueKind.Null)
 168                    {
 169                        continue;
 170                    }
 0171                    id = property.Value.GetString();
 0172                    continue;
 173                }
 0174                if (property.NameEquals("name"))
 175                {
 0176                    if (property.Value.ValueKind == JsonValueKind.Null)
 177                    {
 178                        continue;
 179                    }
 0180                    name = property.Value.GetString();
 0181                    continue;
 182                }
 0183                if (property.NameEquals("type"))
 184                {
 0185                    if (property.Value.ValueKind == JsonValueKind.Null)
 186                    {
 187                        continue;
 188                    }
 0189                    type = property.Value.GetString();
 0190                    continue;
 191                }
 0192                if (property.NameEquals("location"))
 193                {
 0194                    if (property.Value.ValueKind == JsonValueKind.Null)
 195                    {
 196                        continue;
 197                    }
 0198                    location = property.Value.GetString();
 0199                    continue;
 200                }
 0201                if (property.NameEquals("tags"))
 202                {
 0203                    if (property.Value.ValueKind == JsonValueKind.Null)
 204                    {
 205                        continue;
 206                    }
 0207                    Dictionary<string, string> dictionary = new Dictionary<string, string>();
 0208                    foreach (var property0 in property.Value.EnumerateObject())
 209                    {
 0210                        if (property0.Value.ValueKind == JsonValueKind.Null)
 211                        {
 0212                            dictionary.Add(property0.Name, null);
 213                        }
 214                        else
 215                        {
 0216                            dictionary.Add(property0.Name, property0.Value.GetString());
 217                        }
 218                    }
 0219                    tags = dictionary;
 0220                    continue;
 221                }
 0222                if (property.NameEquals("properties"))
 223                {
 0224                    foreach (var property0 in property.Value.EnumerateObject())
 225                    {
 0226                        if (property0.NameEquals("loadBalancerFrontendIpConfigurations"))
 227                        {
 0228                            if (property0.Value.ValueKind == JsonValueKind.Null)
 229                            {
 230                                continue;
 231                            }
 0232                            List<FrontendIPConfiguration> array = new List<FrontendIPConfiguration>();
 0233                            foreach (var item in property0.Value.EnumerateArray())
 234                            {
 0235                                if (item.ValueKind == JsonValueKind.Null)
 236                                {
 0237                                    array.Add(null);
 238                                }
 239                                else
 240                                {
 0241                                    array.Add(FrontendIPConfiguration.DeserializeFrontendIPConfiguration(item));
 242                                }
 243                            }
 0244                            loadBalancerFrontendIpConfigurations = array;
 0245                            continue;
 246                        }
 0247                        if (property0.NameEquals("ipConfigurations"))
 248                        {
 0249                            if (property0.Value.ValueKind == JsonValueKind.Null)
 250                            {
 251                                continue;
 252                            }
 0253                            List<PrivateLinkServiceIpConfiguration> array = new List<PrivateLinkServiceIpConfiguration>(
 0254                            foreach (var item in property0.Value.EnumerateArray())
 255                            {
 0256                                if (item.ValueKind == JsonValueKind.Null)
 257                                {
 0258                                    array.Add(null);
 259                                }
 260                                else
 261                                {
 0262                                    array.Add(PrivateLinkServiceIpConfiguration.DeserializePrivateLinkServiceIpConfigura
 263                                }
 264                            }
 0265                            ipConfigurations = array;
 0266                            continue;
 267                        }
 0268                        if (property0.NameEquals("networkInterfaces"))
 269                        {
 0270                            if (property0.Value.ValueKind == JsonValueKind.Null)
 271                            {
 272                                continue;
 273                            }
 0274                            List<NetworkInterface> array = new List<NetworkInterface>();
 0275                            foreach (var item in property0.Value.EnumerateArray())
 276                            {
 0277                                if (item.ValueKind == JsonValueKind.Null)
 278                                {
 0279                                    array.Add(null);
 280                                }
 281                                else
 282                                {
 0283                                    array.Add(NetworkInterface.DeserializeNetworkInterface(item));
 284                                }
 285                            }
 0286                            networkInterfaces = array;
 0287                            continue;
 288                        }
 0289                        if (property0.NameEquals("provisioningState"))
 290                        {
 0291                            if (property0.Value.ValueKind == JsonValueKind.Null)
 292                            {
 293                                continue;
 294                            }
 0295                            provisioningState = new ProvisioningState(property0.Value.GetString());
 0296                            continue;
 297                        }
 0298                        if (property0.NameEquals("privateEndpointConnections"))
 299                        {
 0300                            if (property0.Value.ValueKind == JsonValueKind.Null)
 301                            {
 302                                continue;
 303                            }
 0304                            List<PrivateEndpointConnection> array = new List<PrivateEndpointConnection>();
 0305                            foreach (var item in property0.Value.EnumerateArray())
 306                            {
 0307                                if (item.ValueKind == JsonValueKind.Null)
 308                                {
 0309                                    array.Add(null);
 310                                }
 311                                else
 312                                {
 0313                                    array.Add(PrivateEndpointConnection.DeserializePrivateEndpointConnection(item));
 314                                }
 315                            }
 0316                            privateEndpointConnections = array;
 0317                            continue;
 318                        }
 0319                        if (property0.NameEquals("visibility"))
 320                        {
 0321                            if (property0.Value.ValueKind == JsonValueKind.Null)
 322                            {
 323                                continue;
 324                            }
 0325                            visibility = ResourceSet.DeserializeResourceSet(property0.Value);
 0326                            continue;
 327                        }
 0328                        if (property0.NameEquals("autoApproval"))
 329                        {
 0330                            if (property0.Value.ValueKind == JsonValueKind.Null)
 331                            {
 332                                continue;
 333                            }
 0334                            autoApproval = ResourceSet.DeserializeResourceSet(property0.Value);
 0335                            continue;
 336                        }
 0337                        if (property0.NameEquals("fqdns"))
 338                        {
 0339                            if (property0.Value.ValueKind == JsonValueKind.Null)
 340                            {
 341                                continue;
 342                            }
 0343                            List<string> array = new List<string>();
 0344                            foreach (var item in property0.Value.EnumerateArray())
 345                            {
 0346                                if (item.ValueKind == JsonValueKind.Null)
 347                                {
 0348                                    array.Add(null);
 349                                }
 350                                else
 351                                {
 0352                                    array.Add(item.GetString());
 353                                }
 354                            }
 0355                            fqdns = array;
 0356                            continue;
 357                        }
 0358                        if (property0.NameEquals("alias"))
 359                        {
 0360                            if (property0.Value.ValueKind == JsonValueKind.Null)
 361                            {
 362                                continue;
 363                            }
 0364                            @alias = property0.Value.GetString();
 0365                            continue;
 366                        }
 0367                        if (property0.NameEquals("enableProxyProtocol"))
 368                        {
 0369                            if (property0.Value.ValueKind == JsonValueKind.Null)
 370                            {
 371                                continue;
 372                            }
 0373                            enableProxyProtocol = property0.Value.GetBoolean();
 374                            continue;
 375                        }
 376                    }
 377                    continue;
 378                }
 379            }
 0380            return new PrivateLinkService(id, name, type, location, tags, etag, loadBalancerFrontendIpConfigurations, ip
 381        }
 382    }
 383}