< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Name()-0%100%
get_Etag()-0%100%
get_Type()-0%100%
get_PrivateIPAddress()-0%100%
get_PrivateIPAllocationMethod()-0%100%
get_Subnet()-0%100%
get_Primary()-0%100%
get_ProvisioningState()-0%100%
get_PrivateIPAddressVersion()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializePrivateLinkServiceIpConfiguration(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\PrivateLinkServiceIpConfiguration.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.Network.Models
 9{
 10    /// <summary> The private link service ip configuration. </summary>
 11    public partial class PrivateLinkServiceIpConfiguration : SubResource
 12    {
 13        /// <summary> Initializes a new instance of PrivateLinkServiceIpConfiguration. </summary>
 014        public PrivateLinkServiceIpConfiguration()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of PrivateLinkServiceIpConfiguration. </summary>
 19        /// <param name="id"> Resource ID. </param>
 20        /// <param name="name"> The name of private link service ip configuration. </param>
 21        /// <param name="etag"> A unique read-only string that changes whenever the resource is updated. </param>
 22        /// <param name="type"> The resource type. </param>
 23        /// <param name="privateIPAddress"> The private IP address of the IP configuration. </param>
 24        /// <param name="privateIPAllocationMethod"> The private IP address allocation method. </param>
 25        /// <param name="subnet"> The reference to the subnet resource. </param>
 26        /// <param name="primary"> Whether the ip configuration is primary or not. </param>
 27        /// <param name="provisioningState"> The provisioning state of the private link service IP configuration resourc
 28        /// <param name="privateIPAddressVersion"> Whether the specific IP configuration is IPv4 or IPv6. Default is IPv
 029        internal PrivateLinkServiceIpConfiguration(string id, string name, string etag, string type, string privateIPAdd
 30        {
 031            Name = name;
 032            Etag = etag;
 033            Type = type;
 034            PrivateIPAddress = privateIPAddress;
 035            PrivateIPAllocationMethod = privateIPAllocationMethod;
 036            Subnet = subnet;
 037            Primary = primary;
 038            ProvisioningState = provisioningState;
 039            PrivateIPAddressVersion = privateIPAddressVersion;
 040        }
 41
 42        /// <summary> The name of private link service ip configuration. </summary>
 043        public string Name { get; set; }
 44        /// <summary> A unique read-only string that changes whenever the resource is updated. </summary>
 045        public string Etag { get; }
 46        /// <summary> The resource type. </summary>
 047        public string Type { get; }
 48        /// <summary> The private IP address of the IP configuration. </summary>
 049        public string PrivateIPAddress { get; set; }
 50        /// <summary> The private IP address allocation method. </summary>
 051        public IPAllocationMethod? PrivateIPAllocationMethod { get; set; }
 52        /// <summary> The reference to the subnet resource. </summary>
 053        public Subnet Subnet { get; set; }
 54        /// <summary> Whether the ip configuration is primary or not. </summary>
 055        public bool? Primary { get; set; }
 56        /// <summary> The provisioning state of the private link service IP configuration resource. </summary>
 057        public ProvisioningState? ProvisioningState { get; }
 58        /// <summary> Whether the specific IP configuration is IPv4 or IPv6. Default is IPv4. </summary>
 059        public IPVersion? PrivateIPAddressVersion { get; set; }
 60    }
 61}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\PrivateLinkServiceIpConfiguration.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 PrivateLinkServiceIpConfiguration : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            if (Name != null)
 19            {
 020                writer.WritePropertyName("name");
 021                writer.WriteStringValue(Name);
 22            }
 023            if (Etag != null)
 24            {
 025                writer.WritePropertyName("etag");
 026                writer.WriteStringValue(Etag);
 27            }
 028            if (Type != null)
 29            {
 030                writer.WritePropertyName("type");
 031                writer.WriteStringValue(Type);
 32            }
 033            if (Id != null)
 34            {
 035                writer.WritePropertyName("id");
 036                writer.WriteStringValue(Id);
 37            }
 038            writer.WritePropertyName("properties");
 039            writer.WriteStartObject();
 040            if (PrivateIPAddress != null)
 41            {
 042                writer.WritePropertyName("privateIPAddress");
 043                writer.WriteStringValue(PrivateIPAddress);
 44            }
 045            if (PrivateIPAllocationMethod != null)
 46            {
 047                writer.WritePropertyName("privateIPAllocationMethod");
 048                writer.WriteStringValue(PrivateIPAllocationMethod.Value.ToString());
 49            }
 050            if (Subnet != null)
 51            {
 052                writer.WritePropertyName("subnet");
 053                writer.WriteObjectValue(Subnet);
 54            }
 055            if (Primary != null)
 56            {
 057                writer.WritePropertyName("primary");
 058                writer.WriteBooleanValue(Primary.Value);
 59            }
 060            if (ProvisioningState != null)
 61            {
 062                writer.WritePropertyName("provisioningState");
 063                writer.WriteStringValue(ProvisioningState.Value.ToString());
 64            }
 065            if (PrivateIPAddressVersion != null)
 66            {
 067                writer.WritePropertyName("privateIPAddressVersion");
 068                writer.WriteStringValue(PrivateIPAddressVersion.Value.ToString());
 69            }
 070            writer.WriteEndObject();
 071            writer.WriteEndObject();
 072        }
 73
 74        internal static PrivateLinkServiceIpConfiguration DeserializePrivateLinkServiceIpConfiguration(JsonElement eleme
 75        {
 076            string name = default;
 077            string etag = default;
 078            string type = default;
 079            string id = default;
 080            string privateIPAddress = default;
 081            IPAllocationMethod? privateIPAllocationMethod = default;
 082            Subnet subnet = default;
 083            bool? primary = default;
 084            ProvisioningState? provisioningState = default;
 085            IPVersion? privateIPAddressVersion = default;
 086            foreach (var property in element.EnumerateObject())
 87            {
 088                if (property.NameEquals("name"))
 89                {
 090                    if (property.Value.ValueKind == JsonValueKind.Null)
 91                    {
 92                        continue;
 93                    }
 094                    name = property.Value.GetString();
 095                    continue;
 96                }
 097                if (property.NameEquals("etag"))
 98                {
 099                    if (property.Value.ValueKind == JsonValueKind.Null)
 100                    {
 101                        continue;
 102                    }
 0103                    etag = property.Value.GetString();
 0104                    continue;
 105                }
 0106                if (property.NameEquals("type"))
 107                {
 0108                    if (property.Value.ValueKind == JsonValueKind.Null)
 109                    {
 110                        continue;
 111                    }
 0112                    type = property.Value.GetString();
 0113                    continue;
 114                }
 0115                if (property.NameEquals("id"))
 116                {
 0117                    if (property.Value.ValueKind == JsonValueKind.Null)
 118                    {
 119                        continue;
 120                    }
 0121                    id = property.Value.GetString();
 0122                    continue;
 123                }
 0124                if (property.NameEquals("properties"))
 125                {
 0126                    foreach (var property0 in property.Value.EnumerateObject())
 127                    {
 0128                        if (property0.NameEquals("privateIPAddress"))
 129                        {
 0130                            if (property0.Value.ValueKind == JsonValueKind.Null)
 131                            {
 132                                continue;
 133                            }
 0134                            privateIPAddress = property0.Value.GetString();
 0135                            continue;
 136                        }
 0137                        if (property0.NameEquals("privateIPAllocationMethod"))
 138                        {
 0139                            if (property0.Value.ValueKind == JsonValueKind.Null)
 140                            {
 141                                continue;
 142                            }
 0143                            privateIPAllocationMethod = new IPAllocationMethod(property0.Value.GetString());
 0144                            continue;
 145                        }
 0146                        if (property0.NameEquals("subnet"))
 147                        {
 0148                            if (property0.Value.ValueKind == JsonValueKind.Null)
 149                            {
 150                                continue;
 151                            }
 0152                            subnet = Subnet.DeserializeSubnet(property0.Value);
 0153                            continue;
 154                        }
 0155                        if (property0.NameEquals("primary"))
 156                        {
 0157                            if (property0.Value.ValueKind == JsonValueKind.Null)
 158                            {
 159                                continue;
 160                            }
 0161                            primary = property0.Value.GetBoolean();
 0162                            continue;
 163                        }
 0164                        if (property0.NameEquals("provisioningState"))
 165                        {
 0166                            if (property0.Value.ValueKind == JsonValueKind.Null)
 167                            {
 168                                continue;
 169                            }
 0170                            provisioningState = new ProvisioningState(property0.Value.GetString());
 0171                            continue;
 172                        }
 0173                        if (property0.NameEquals("privateIPAddressVersion"))
 174                        {
 0175                            if (property0.Value.ValueKind == JsonValueKind.Null)
 176                            {
 177                                continue;
 178                            }
 0179                            privateIPAddressVersion = new IPVersion(property0.Value.GetString());
 180                            continue;
 181                        }
 182                    }
 183                    continue;
 184                }
 185            }
 0186            return new PrivateLinkServiceIpConfiguration(id, name, etag, type, privateIPAddress, privateIPAllocationMeth
 187        }
 188    }
 189}