< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Name()-0%100%
get_Type()-0%100%
get_Etag()-0%100%
get_IpConfigurations()-0%100%
get_ContainerNetworkInterfaces()-0%100%
get_ProvisioningState()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeContainerNetworkInterfaceConfiguration(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ContainerNetworkInterfaceConfiguration.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> Container network interface configuration child resource. </summary>
 13    public partial class ContainerNetworkInterfaceConfiguration : SubResource
 14    {
 15        /// <summary> Initializes a new instance of ContainerNetworkInterfaceConfiguration. </summary>
 016        public ContainerNetworkInterfaceConfiguration()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of ContainerNetworkInterfaceConfiguration. </summary>
 21        /// <param name="id"> Resource ID. </param>
 22        /// <param name="name"> The name of the resource. This name can be used to access the resource. </param>
 23        /// <param name="type"> Sub Resource type. </param>
 24        /// <param name="etag"> A unique read-only string that changes whenever the resource is updated. </param>
 25        /// <param name="ipConfigurations"> A list of ip configurations of the container network interface configuration
 26        /// <param name="containerNetworkInterfaces"> A list of container network interfaces created from this container
 27        /// <param name="provisioningState"> The provisioning state of the container network interface configuration res
 028        internal ContainerNetworkInterfaceConfiguration(string id, string name, string type, string etag, IList<IPConfig
 29        {
 030            Name = name;
 031            Type = type;
 032            Etag = etag;
 033            IpConfigurations = ipConfigurations;
 034            ContainerNetworkInterfaces = containerNetworkInterfaces;
 035            ProvisioningState = provisioningState;
 036        }
 37
 38        /// <summary> The name of the resource. This name can be used to access the resource. </summary>
 039        public string Name { get; set; }
 40        /// <summary> Sub Resource type. </summary>
 041        public string Type { get; }
 42        /// <summary> A unique read-only string that changes whenever the resource is updated. </summary>
 043        public string Etag { get; }
 44        /// <summary> A list of ip configurations of the container network interface configuration. </summary>
 045        public IList<IPConfigurationProfile> IpConfigurations { get; set; }
 46        /// <summary> A list of container network interfaces created from this container network interface configuration
 047        public IList<SubResource> ContainerNetworkInterfaces { get; set; }
 48        /// <summary> The provisioning state of the container network interface configuration resource. </summary>
 049        public ProvisioningState? ProvisioningState { get; }
 50    }
 51}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ContainerNetworkInterfaceConfiguration.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 ContainerNetworkInterfaceConfiguration : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            if (Name != null)
 20            {
 021                writer.WritePropertyName("name");
 022                writer.WriteStringValue(Name);
 23            }
 024            if (Type != null)
 25            {
 026                writer.WritePropertyName("type");
 027                writer.WriteStringValue(Type);
 28            }
 029            if (Etag != null)
 30            {
 031                writer.WritePropertyName("etag");
 032                writer.WriteStringValue(Etag);
 33            }
 034            if (Id != null)
 35            {
 036                writer.WritePropertyName("id");
 037                writer.WriteStringValue(Id);
 38            }
 039            writer.WritePropertyName("properties");
 040            writer.WriteStartObject();
 041            if (IpConfigurations != null)
 42            {
 043                writer.WritePropertyName("ipConfigurations");
 044                writer.WriteStartArray();
 045                foreach (var item in IpConfigurations)
 46                {
 047                    writer.WriteObjectValue(item);
 48                }
 049                writer.WriteEndArray();
 50            }
 051            if (ContainerNetworkInterfaces != null)
 52            {
 053                writer.WritePropertyName("containerNetworkInterfaces");
 054                writer.WriteStartArray();
 055                foreach (var item in ContainerNetworkInterfaces)
 56                {
 057                    writer.WriteObjectValue(item);
 58                }
 059                writer.WriteEndArray();
 60            }
 061            if (ProvisioningState != null)
 62            {
 063                writer.WritePropertyName("provisioningState");
 064                writer.WriteStringValue(ProvisioningState.Value.ToString());
 65            }
 066            writer.WriteEndObject();
 067            writer.WriteEndObject();
 068        }
 69
 70        internal static ContainerNetworkInterfaceConfiguration DeserializeContainerNetworkInterfaceConfiguration(JsonEle
 71        {
 072            string name = default;
 073            string type = default;
 074            string etag = default;
 075            string id = default;
 076            IList<IPConfigurationProfile> ipConfigurations = default;
 077            IList<SubResource> containerNetworkInterfaces = default;
 078            ProvisioningState? provisioningState = default;
 079            foreach (var property in element.EnumerateObject())
 80            {
 081                if (property.NameEquals("name"))
 82                {
 083                    if (property.Value.ValueKind == JsonValueKind.Null)
 84                    {
 85                        continue;
 86                    }
 087                    name = property.Value.GetString();
 088                    continue;
 89                }
 090                if (property.NameEquals("type"))
 91                {
 092                    if (property.Value.ValueKind == JsonValueKind.Null)
 93                    {
 94                        continue;
 95                    }
 096                    type = property.Value.GetString();
 097                    continue;
 98                }
 099                if (property.NameEquals("etag"))
 100                {
 0101                    if (property.Value.ValueKind == JsonValueKind.Null)
 102                    {
 103                        continue;
 104                    }
 0105                    etag = property.Value.GetString();
 0106                    continue;
 107                }
 0108                if (property.NameEquals("id"))
 109                {
 0110                    if (property.Value.ValueKind == JsonValueKind.Null)
 111                    {
 112                        continue;
 113                    }
 0114                    id = property.Value.GetString();
 0115                    continue;
 116                }
 0117                if (property.NameEquals("properties"))
 118                {
 0119                    foreach (var property0 in property.Value.EnumerateObject())
 120                    {
 0121                        if (property0.NameEquals("ipConfigurations"))
 122                        {
 0123                            if (property0.Value.ValueKind == JsonValueKind.Null)
 124                            {
 125                                continue;
 126                            }
 0127                            List<IPConfigurationProfile> array = new List<IPConfigurationProfile>();
 0128                            foreach (var item in property0.Value.EnumerateArray())
 129                            {
 0130                                if (item.ValueKind == JsonValueKind.Null)
 131                                {
 0132                                    array.Add(null);
 133                                }
 134                                else
 135                                {
 0136                                    array.Add(IPConfigurationProfile.DeserializeIPConfigurationProfile(item));
 137                                }
 138                            }
 0139                            ipConfigurations = array;
 0140                            continue;
 141                        }
 0142                        if (property0.NameEquals("containerNetworkInterfaces"))
 143                        {
 0144                            if (property0.Value.ValueKind == JsonValueKind.Null)
 145                            {
 146                                continue;
 147                            }
 0148                            List<SubResource> array = new List<SubResource>();
 0149                            foreach (var item in property0.Value.EnumerateArray())
 150                            {
 0151                                if (item.ValueKind == JsonValueKind.Null)
 152                                {
 0153                                    array.Add(null);
 154                                }
 155                                else
 156                                {
 0157                                    array.Add(DeserializeSubResource(item));
 158                                }
 159                            }
 0160                            containerNetworkInterfaces = array;
 0161                            continue;
 162                        }
 0163                        if (property0.NameEquals("provisioningState"))
 164                        {
 0165                            if (property0.Value.ValueKind == JsonValueKind.Null)
 166                            {
 167                                continue;
 168                            }
 0169                            provisioningState = new ProvisioningState(property0.Value.GetString());
 170                            continue;
 171                        }
 172                    }
 173                    continue;
 174                }
 175            }
 0176            return new ContainerNetworkInterfaceConfiguration(id, name, type, etag, ipConfigurations, containerNetworkIn
 177        }
 178    }
 179}