< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Name()-0%100%
get_Id()-0%100%
get_Etag()-0%100%
get_Type()-0%100%
get_Location()-0%100%
get_Tags()-0%100%
get_Source()-0%100%
get_Destination()-0%100%
get_AutoStart()-0%100%
get_MonitoringIntervalInSeconds()-0%100%
get_Endpoints()-0%100%
get_TestConfigurations()-0%100%
get_TestGroups()-0%100%
get_Outputs()-0%100%
get_Notes()-0%100%
get_ProvisioningState()-0%100%
get_StartTime()-0%100%
get_MonitoringStatus()-0%100%
get_ConnectionMonitorType()-0%100%
DeserializeConnectionMonitorResult(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ConnectionMonitorResult.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;
 9using System.Collections.Generic;
 10
 11namespace Azure.ResourceManager.Network.Models
 12{
 13    /// <summary> Information about the connection monitor. </summary>
 14    public partial class ConnectionMonitorResult
 15    {
 16        /// <summary> Initializes a new instance of ConnectionMonitorResult. </summary>
 017        internal ConnectionMonitorResult()
 18        {
 019        }
 20
 21        /// <summary> Initializes a new instance of ConnectionMonitorResult. </summary>
 22        /// <param name="name"> Name of the connection monitor. </param>
 23        /// <param name="id"> ID of the connection monitor. </param>
 24        /// <param name="etag"> A unique read-only string that changes whenever the resource is updated. </param>
 25        /// <param name="type"> Connection monitor type. </param>
 26        /// <param name="location"> Connection monitor location. </param>
 27        /// <param name="tags"> Connection monitor tags. </param>
 28        /// <param name="source"> Describes the source of connection monitor. </param>
 29        /// <param name="destination"> Describes the destination of connection monitor. </param>
 30        /// <param name="autoStart"> Determines if the connection monitor will start automatically once created. </param
 31        /// <param name="monitoringIntervalInSeconds"> Monitoring interval in seconds. </param>
 32        /// <param name="endpoints"> List of connection monitor endpoints. </param>
 33        /// <param name="testConfigurations"> List of connection monitor test configurations. </param>
 34        /// <param name="testGroups"> List of connection monitor test groups. </param>
 35        /// <param name="outputs"> List of connection monitor outputs. </param>
 36        /// <param name="notes"> Optional notes to be associated with the connection monitor. </param>
 37        /// <param name="provisioningState"> The provisioning state of the connection monitor. </param>
 38        /// <param name="startTime"> The date and time when the connection monitor was started. </param>
 39        /// <param name="monitoringStatus"> The monitoring status of the connection monitor. </param>
 40        /// <param name="connectionMonitorType"> Type of connection monitor. </param>
 041        internal ConnectionMonitorResult(string name, string id, string etag, string type, string location, IReadOnlyDic
 42        {
 043            Name = name;
 044            Id = id;
 045            Etag = etag;
 046            Type = type;
 047            Location = location;
 048            Tags = tags;
 049            Source = source;
 050            Destination = destination;
 051            AutoStart = autoStart;
 052            MonitoringIntervalInSeconds = monitoringIntervalInSeconds;
 053            Endpoints = endpoints;
 054            TestConfigurations = testConfigurations;
 055            TestGroups = testGroups;
 056            Outputs = outputs;
 057            Notes = notes;
 058            ProvisioningState = provisioningState;
 059            StartTime = startTime;
 060            MonitoringStatus = monitoringStatus;
 061            ConnectionMonitorType = connectionMonitorType;
 062        }
 63
 64        /// <summary> Name of the connection monitor. </summary>
 065        public string Name { get; }
 66        /// <summary> ID of the connection monitor. </summary>
 067        public string Id { get; }
 68        /// <summary> A unique read-only string that changes whenever the resource is updated. </summary>
 069        public string Etag { get; }
 70        /// <summary> Connection monitor type. </summary>
 071        public string Type { get; }
 72        /// <summary> Connection monitor location. </summary>
 073        public string Location { get; }
 74        /// <summary> Connection monitor tags. </summary>
 075        public IReadOnlyDictionary<string, string> Tags { get; }
 76        /// <summary> Describes the source of connection monitor. </summary>
 077        public ConnectionMonitorSource Source { get; }
 78        /// <summary> Describes the destination of connection monitor. </summary>
 079        public ConnectionMonitorDestination Destination { get; }
 80        /// <summary> Determines if the connection monitor will start automatically once created. </summary>
 081        public bool? AutoStart { get; }
 82        /// <summary> Monitoring interval in seconds. </summary>
 083        public int? MonitoringIntervalInSeconds { get; }
 84        /// <summary> List of connection monitor endpoints. </summary>
 085        public IReadOnlyList<ConnectionMonitorEndpoint> Endpoints { get; }
 86        /// <summary> List of connection monitor test configurations. </summary>
 087        public IReadOnlyList<ConnectionMonitorTestConfiguration> TestConfigurations { get; }
 88        /// <summary> List of connection monitor test groups. </summary>
 089        public IReadOnlyList<ConnectionMonitorTestGroup> TestGroups { get; }
 90        /// <summary> List of connection monitor outputs. </summary>
 091        public IReadOnlyList<ConnectionMonitorOutput> Outputs { get; }
 92        /// <summary> Optional notes to be associated with the connection monitor. </summary>
 093        public string Notes { get; }
 94        /// <summary> The provisioning state of the connection monitor. </summary>
 095        public ProvisioningState? ProvisioningState { get; }
 96        /// <summary> The date and time when the connection monitor was started. </summary>
 097        public DateTimeOffset? StartTime { get; }
 98        /// <summary> The monitoring status of the connection monitor. </summary>
 099        public string MonitoringStatus { get; }
 100        /// <summary> Type of connection monitor. </summary>
 0101        public ConnectionMonitorType? ConnectionMonitorType { get; }
 102    }
 103}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ConnectionMonitorResult.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;
 9using System.Collections.Generic;
 10using System.Text.Json;
 11using Azure.Core;
 12
 13namespace Azure.ResourceManager.Network.Models
 14{
 15    public partial class ConnectionMonitorResult
 16    {
 17        internal static ConnectionMonitorResult DeserializeConnectionMonitorResult(JsonElement element)
 18        {
 019            string name = default;
 020            string id = default;
 021            string etag = default;
 022            string type = default;
 023            string location = default;
 024            IReadOnlyDictionary<string, string> tags = default;
 025            ConnectionMonitorSource source = default;
 026            ConnectionMonitorDestination destination = default;
 027            bool? autoStart = default;
 028            int? monitoringIntervalInSeconds = default;
 029            IReadOnlyList<ConnectionMonitorEndpoint> endpoints = default;
 030            IReadOnlyList<ConnectionMonitorTestConfiguration> testConfigurations = default;
 031            IReadOnlyList<ConnectionMonitorTestGroup> testGroups = default;
 032            IReadOnlyList<ConnectionMonitorOutput> outputs = default;
 033            string notes = default;
 034            ProvisioningState? provisioningState = default;
 035            DateTimeOffset? startTime = default;
 036            string monitoringStatus = default;
 037            ConnectionMonitorType? connectionMonitorType = default;
 038            foreach (var property in element.EnumerateObject())
 39            {
 040                if (property.NameEquals("name"))
 41                {
 042                    if (property.Value.ValueKind == JsonValueKind.Null)
 43                    {
 44                        continue;
 45                    }
 046                    name = property.Value.GetString();
 047                    continue;
 48                }
 049                if (property.NameEquals("id"))
 50                {
 051                    if (property.Value.ValueKind == JsonValueKind.Null)
 52                    {
 53                        continue;
 54                    }
 055                    id = property.Value.GetString();
 056                    continue;
 57                }
 058                if (property.NameEquals("etag"))
 59                {
 060                    if (property.Value.ValueKind == JsonValueKind.Null)
 61                    {
 62                        continue;
 63                    }
 064                    etag = property.Value.GetString();
 065                    continue;
 66                }
 067                if (property.NameEquals("type"))
 68                {
 069                    if (property.Value.ValueKind == JsonValueKind.Null)
 70                    {
 71                        continue;
 72                    }
 073                    type = property.Value.GetString();
 074                    continue;
 75                }
 076                if (property.NameEquals("location"))
 77                {
 078                    if (property.Value.ValueKind == JsonValueKind.Null)
 79                    {
 80                        continue;
 81                    }
 082                    location = property.Value.GetString();
 083                    continue;
 84                }
 085                if (property.NameEquals("tags"))
 86                {
 087                    if (property.Value.ValueKind == JsonValueKind.Null)
 88                    {
 89                        continue;
 90                    }
 091                    Dictionary<string, string> dictionary = new Dictionary<string, string>();
 092                    foreach (var property0 in property.Value.EnumerateObject())
 93                    {
 094                        if (property0.Value.ValueKind == JsonValueKind.Null)
 95                        {
 096                            dictionary.Add(property0.Name, null);
 97                        }
 98                        else
 99                        {
 0100                            dictionary.Add(property0.Name, property0.Value.GetString());
 101                        }
 102                    }
 0103                    tags = dictionary;
 0104                    continue;
 105                }
 0106                if (property.NameEquals("properties"))
 107                {
 0108                    foreach (var property0 in property.Value.EnumerateObject())
 109                    {
 0110                        if (property0.NameEquals("source"))
 111                        {
 0112                            if (property0.Value.ValueKind == JsonValueKind.Null)
 113                            {
 114                                continue;
 115                            }
 0116                            source = ConnectionMonitorSource.DeserializeConnectionMonitorSource(property0.Value);
 0117                            continue;
 118                        }
 0119                        if (property0.NameEquals("destination"))
 120                        {
 0121                            if (property0.Value.ValueKind == JsonValueKind.Null)
 122                            {
 123                                continue;
 124                            }
 0125                            destination = ConnectionMonitorDestination.DeserializeConnectionMonitorDestination(property0
 0126                            continue;
 127                        }
 0128                        if (property0.NameEquals("autoStart"))
 129                        {
 0130                            if (property0.Value.ValueKind == JsonValueKind.Null)
 131                            {
 132                                continue;
 133                            }
 0134                            autoStart = property0.Value.GetBoolean();
 0135                            continue;
 136                        }
 0137                        if (property0.NameEquals("monitoringIntervalInSeconds"))
 138                        {
 0139                            if (property0.Value.ValueKind == JsonValueKind.Null)
 140                            {
 141                                continue;
 142                            }
 0143                            monitoringIntervalInSeconds = property0.Value.GetInt32();
 0144                            continue;
 145                        }
 0146                        if (property0.NameEquals("endpoints"))
 147                        {
 0148                            if (property0.Value.ValueKind == JsonValueKind.Null)
 149                            {
 150                                continue;
 151                            }
 0152                            List<ConnectionMonitorEndpoint> array = new List<ConnectionMonitorEndpoint>();
 0153                            foreach (var item in property0.Value.EnumerateArray())
 154                            {
 0155                                if (item.ValueKind == JsonValueKind.Null)
 156                                {
 0157                                    array.Add(null);
 158                                }
 159                                else
 160                                {
 0161                                    array.Add(ConnectionMonitorEndpoint.DeserializeConnectionMonitorEndpoint(item));
 162                                }
 163                            }
 0164                            endpoints = array;
 0165                            continue;
 166                        }
 0167                        if (property0.NameEquals("testConfigurations"))
 168                        {
 0169                            if (property0.Value.ValueKind == JsonValueKind.Null)
 170                            {
 171                                continue;
 172                            }
 0173                            List<ConnectionMonitorTestConfiguration> array = new List<ConnectionMonitorTestConfiguration
 0174                            foreach (var item in property0.Value.EnumerateArray())
 175                            {
 0176                                if (item.ValueKind == JsonValueKind.Null)
 177                                {
 0178                                    array.Add(null);
 179                                }
 180                                else
 181                                {
 0182                                    array.Add(ConnectionMonitorTestConfiguration.DeserializeConnectionMonitorTestConfigu
 183                                }
 184                            }
 0185                            testConfigurations = array;
 0186                            continue;
 187                        }
 0188                        if (property0.NameEquals("testGroups"))
 189                        {
 0190                            if (property0.Value.ValueKind == JsonValueKind.Null)
 191                            {
 192                                continue;
 193                            }
 0194                            List<ConnectionMonitorTestGroup> array = new List<ConnectionMonitorTestGroup>();
 0195                            foreach (var item in property0.Value.EnumerateArray())
 196                            {
 0197                                if (item.ValueKind == JsonValueKind.Null)
 198                                {
 0199                                    array.Add(null);
 200                                }
 201                                else
 202                                {
 0203                                    array.Add(ConnectionMonitorTestGroup.DeserializeConnectionMonitorTestGroup(item));
 204                                }
 205                            }
 0206                            testGroups = array;
 0207                            continue;
 208                        }
 0209                        if (property0.NameEquals("outputs"))
 210                        {
 0211                            if (property0.Value.ValueKind == JsonValueKind.Null)
 212                            {
 213                                continue;
 214                            }
 0215                            List<ConnectionMonitorOutput> array = new List<ConnectionMonitorOutput>();
 0216                            foreach (var item in property0.Value.EnumerateArray())
 217                            {
 0218                                if (item.ValueKind == JsonValueKind.Null)
 219                                {
 0220                                    array.Add(null);
 221                                }
 222                                else
 223                                {
 0224                                    array.Add(ConnectionMonitorOutput.DeserializeConnectionMonitorOutput(item));
 225                                }
 226                            }
 0227                            outputs = array;
 0228                            continue;
 229                        }
 0230                        if (property0.NameEquals("notes"))
 231                        {
 0232                            if (property0.Value.ValueKind == JsonValueKind.Null)
 233                            {
 234                                continue;
 235                            }
 0236                            notes = property0.Value.GetString();
 0237                            continue;
 238                        }
 0239                        if (property0.NameEquals("provisioningState"))
 240                        {
 0241                            if (property0.Value.ValueKind == JsonValueKind.Null)
 242                            {
 243                                continue;
 244                            }
 0245                            provisioningState = new ProvisioningState(property0.Value.GetString());
 0246                            continue;
 247                        }
 0248                        if (property0.NameEquals("startTime"))
 249                        {
 0250                            if (property0.Value.ValueKind == JsonValueKind.Null)
 251                            {
 252                                continue;
 253                            }
 0254                            startTime = property0.Value.GetDateTimeOffset("O");
 0255                            continue;
 256                        }
 0257                        if (property0.NameEquals("monitoringStatus"))
 258                        {
 0259                            if (property0.Value.ValueKind == JsonValueKind.Null)
 260                            {
 261                                continue;
 262                            }
 0263                            monitoringStatus = property0.Value.GetString();
 0264                            continue;
 265                        }
 0266                        if (property0.NameEquals("connectionMonitorType"))
 267                        {
 0268                            if (property0.Value.ValueKind == JsonValueKind.Null)
 269                            {
 270                                continue;
 271                            }
 0272                            connectionMonitorType = new ConnectionMonitorType(property0.Value.GetString());
 273                            continue;
 274                        }
 275                    }
 276                    continue;
 277                }
 278            }
 0279            return new ConnectionMonitorResult(name, id, etag, type, location, tags, source, destination, autoStart, mon
 280        }
 281    }
 282}