< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Etag()-0%100%
get_ProvisioningState()-0%100%
get_SecurityProviderName()-0%100%
get_ConnectionStatus()-0%100%
get_VirtualHub()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeSecurityPartnerProvider(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\SecurityPartnerProvider.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> Security Partner Provider resource. </summary>
 13    public partial class SecurityPartnerProvider : Resource
 14    {
 15        /// <summary> Initializes a new instance of SecurityPartnerProvider. </summary>
 016        public SecurityPartnerProvider()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of SecurityPartnerProvider. </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="provisioningState"> The provisioning state of the Security Partner Provider resource. </param>
 28        /// <param name="securityProviderName"> The security provider name. </param>
 29        /// <param name="connectionStatus"> The connection status with the Security Partner Provider. </param>
 30        /// <param name="virtualHub"> The virtualHub to which the Security Partner Provider belongs. </param>
 031        internal SecurityPartnerProvider(string id, string name, string type, string location, IDictionary<string, strin
 32        {
 033            Etag = etag;
 034            ProvisioningState = provisioningState;
 035            SecurityProviderName = securityProviderName;
 036            ConnectionStatus = connectionStatus;
 037            VirtualHub = virtualHub;
 038        }
 39
 40        /// <summary> A unique read-only string that changes whenever the resource is updated. </summary>
 041        public string Etag { get; }
 42        /// <summary> The provisioning state of the Security Partner Provider resource. </summary>
 043        public ProvisioningState? ProvisioningState { get; }
 44        /// <summary> The security provider name. </summary>
 045        public SecurityProviderName? SecurityProviderName { get; set; }
 46        /// <summary> The connection status with the Security Partner Provider. </summary>
 047        public SecurityPartnerProviderConnectionStatus? ConnectionStatus { get; }
 48        /// <summary> The virtualHub to which the Security Partner Provider belongs. </summary>
 049        public SubResource VirtualHub { get; set; }
 50    }
 51}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\SecurityPartnerProvider.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 SecurityPartnerProvider : 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 (ProvisioningState != null)
 58            {
 059                writer.WritePropertyName("provisioningState");
 060                writer.WriteStringValue(ProvisioningState.Value.ToString());
 61            }
 062            if (SecurityProviderName != null)
 63            {
 064                writer.WritePropertyName("securityProviderName");
 065                writer.WriteStringValue(SecurityProviderName.Value.ToString());
 66            }
 067            if (ConnectionStatus != null)
 68            {
 069                writer.WritePropertyName("connectionStatus");
 070                writer.WriteStringValue(ConnectionStatus.Value.ToString());
 71            }
 072            if (VirtualHub != null)
 73            {
 074                writer.WritePropertyName("virtualHub");
 075                writer.WriteObjectValue(VirtualHub);
 76            }
 077            writer.WriteEndObject();
 078            writer.WriteEndObject();
 079        }
 80
 81        internal static SecurityPartnerProvider DeserializeSecurityPartnerProvider(JsonElement element)
 82        {
 083            string etag = default;
 084            string id = default;
 085            string name = default;
 086            string type = default;
 087            string location = default;
 088            IDictionary<string, string> tags = default;
 089            ProvisioningState? provisioningState = default;
 090            SecurityProviderName? securityProviderName = default;
 091            SecurityPartnerProviderConnectionStatus? connectionStatus = default;
 092            SubResource virtualHub = default;
 093            foreach (var property in element.EnumerateObject())
 94            {
 095                if (property.NameEquals("etag"))
 96                {
 097                    if (property.Value.ValueKind == JsonValueKind.Null)
 98                    {
 99                        continue;
 100                    }
 0101                    etag = property.Value.GetString();
 0102                    continue;
 103                }
 0104                if (property.NameEquals("id"))
 105                {
 0106                    if (property.Value.ValueKind == JsonValueKind.Null)
 107                    {
 108                        continue;
 109                    }
 0110                    id = property.Value.GetString();
 0111                    continue;
 112                }
 0113                if (property.NameEquals("name"))
 114                {
 0115                    if (property.Value.ValueKind == JsonValueKind.Null)
 116                    {
 117                        continue;
 118                    }
 0119                    name = property.Value.GetString();
 0120                    continue;
 121                }
 0122                if (property.NameEquals("type"))
 123                {
 0124                    if (property.Value.ValueKind == JsonValueKind.Null)
 125                    {
 126                        continue;
 127                    }
 0128                    type = property.Value.GetString();
 0129                    continue;
 130                }
 0131                if (property.NameEquals("location"))
 132                {
 0133                    if (property.Value.ValueKind == JsonValueKind.Null)
 134                    {
 135                        continue;
 136                    }
 0137                    location = property.Value.GetString();
 0138                    continue;
 139                }
 0140                if (property.NameEquals("tags"))
 141                {
 0142                    if (property.Value.ValueKind == JsonValueKind.Null)
 143                    {
 144                        continue;
 145                    }
 0146                    Dictionary<string, string> dictionary = new Dictionary<string, string>();
 0147                    foreach (var property0 in property.Value.EnumerateObject())
 148                    {
 0149                        if (property0.Value.ValueKind == JsonValueKind.Null)
 150                        {
 0151                            dictionary.Add(property0.Name, null);
 152                        }
 153                        else
 154                        {
 0155                            dictionary.Add(property0.Name, property0.Value.GetString());
 156                        }
 157                    }
 0158                    tags = dictionary;
 0159                    continue;
 160                }
 0161                if (property.NameEquals("properties"))
 162                {
 0163                    foreach (var property0 in property.Value.EnumerateObject())
 164                    {
 0165                        if (property0.NameEquals("provisioningState"))
 166                        {
 0167                            if (property0.Value.ValueKind == JsonValueKind.Null)
 168                            {
 169                                continue;
 170                            }
 0171                            provisioningState = new ProvisioningState(property0.Value.GetString());
 0172                            continue;
 173                        }
 0174                        if (property0.NameEquals("securityProviderName"))
 175                        {
 0176                            if (property0.Value.ValueKind == JsonValueKind.Null)
 177                            {
 178                                continue;
 179                            }
 0180                            securityProviderName = new SecurityProviderName(property0.Value.GetString());
 0181                            continue;
 182                        }
 0183                        if (property0.NameEquals("connectionStatus"))
 184                        {
 0185                            if (property0.Value.ValueKind == JsonValueKind.Null)
 186                            {
 187                                continue;
 188                            }
 0189                            connectionStatus = new SecurityPartnerProviderConnectionStatus(property0.Value.GetString());
 0190                            continue;
 191                        }
 0192                        if (property0.NameEquals("virtualHub"))
 193                        {
 0194                            if (property0.Value.ValueKind == JsonValueKind.Null)
 195                            {
 196                                continue;
 197                            }
 0198                            virtualHub = SubResource.DeserializeSubResource(property0.Value);
 199                            continue;
 200                        }
 201                    }
 202                    continue;
 203                }
 204            }
 0205            return new SecurityPartnerProvider(id, name, type, location, tags, etag, provisioningState, securityProvider
 206        }
 207    }
 208}