< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-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%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ConnectionMonitor.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> Parameters that define the operation to create a connection monitor. </summary>
 13    public partial class ConnectionMonitor
 14    {
 15        /// <summary> Initializes a new instance of ConnectionMonitor. </summary>
 016        public ConnectionMonitor()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of ConnectionMonitor. </summary>
 21        /// <param name="location"> Connection monitor location. </param>
 22        /// <param name="tags"> Connection monitor tags. </param>
 23        /// <param name="source"> Describes the source of connection monitor. </param>
 24        /// <param name="destination"> Describes the destination of connection monitor. </param>
 25        /// <param name="autoStart"> Determines if the connection monitor will start automatically once created. </param
 26        /// <param name="monitoringIntervalInSeconds"> Monitoring interval in seconds. </param>
 27        /// <param name="endpoints"> List of connection monitor endpoints. </param>
 28        /// <param name="testConfigurations"> List of connection monitor test configurations. </param>
 29        /// <param name="testGroups"> List of connection monitor test groups. </param>
 30        /// <param name="outputs"> List of connection monitor outputs. </param>
 31        /// <param name="notes"> Optional notes to be associated with the connection monitor. </param>
 032        internal ConnectionMonitor(string location, IDictionary<string, string> tags, ConnectionMonitorSource source, Co
 33        {
 034            Location = location;
 035            Tags = tags;
 036            Source = source;
 037            Destination = destination;
 038            AutoStart = autoStart;
 039            MonitoringIntervalInSeconds = monitoringIntervalInSeconds;
 040            Endpoints = endpoints;
 041            TestConfigurations = testConfigurations;
 042            TestGroups = testGroups;
 043            Outputs = outputs;
 044            Notes = notes;
 045        }
 46
 47        /// <summary> Connection monitor location. </summary>
 048        public string Location { get; set; }
 49        /// <summary> Connection monitor tags. </summary>
 050        public IDictionary<string, string> Tags { get; set; }
 51        /// <summary> Describes the source of connection monitor. </summary>
 052        public ConnectionMonitorSource Source { get; set; }
 53        /// <summary> Describes the destination of connection monitor. </summary>
 054        public ConnectionMonitorDestination Destination { get; set; }
 55        /// <summary> Determines if the connection monitor will start automatically once created. </summary>
 056        public bool? AutoStart { get; set; }
 57        /// <summary> Monitoring interval in seconds. </summary>
 058        public int? MonitoringIntervalInSeconds { get; set; }
 59        /// <summary> List of connection monitor endpoints. </summary>
 060        public IList<ConnectionMonitorEndpoint> Endpoints { get; set; }
 61        /// <summary> List of connection monitor test configurations. </summary>
 062        public IList<ConnectionMonitorTestConfiguration> TestConfigurations { get; set; }
 63        /// <summary> List of connection monitor test groups. </summary>
 064        public IList<ConnectionMonitorTestGroup> TestGroups { get; set; }
 65        /// <summary> List of connection monitor outputs. </summary>
 066        public IList<ConnectionMonitorOutput> Outputs { get; set; }
 67        /// <summary> Optional notes to be associated with the connection monitor. </summary>
 068        public string Notes { get; set; }
 69    }
 70}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ConnectionMonitor.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 ConnectionMonitor : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            if (Location != null)
 19            {
 020                writer.WritePropertyName("location");
 021                writer.WriteStringValue(Location);
 22            }
 023            if (Tags != null)
 24            {
 025                writer.WritePropertyName("tags");
 026                writer.WriteStartObject();
 027                foreach (var item in Tags)
 28                {
 029                    writer.WritePropertyName(item.Key);
 030                    writer.WriteStringValue(item.Value);
 31                }
 032                writer.WriteEndObject();
 33            }
 034            writer.WritePropertyName("properties");
 035            writer.WriteStartObject();
 036            if (Source != null)
 37            {
 038                writer.WritePropertyName("source");
 039                writer.WriteObjectValue(Source);
 40            }
 041            if (Destination != null)
 42            {
 043                writer.WritePropertyName("destination");
 044                writer.WriteObjectValue(Destination);
 45            }
 046            if (AutoStart != null)
 47            {
 048                writer.WritePropertyName("autoStart");
 049                writer.WriteBooleanValue(AutoStart.Value);
 50            }
 051            if (MonitoringIntervalInSeconds != null)
 52            {
 053                writer.WritePropertyName("monitoringIntervalInSeconds");
 054                writer.WriteNumberValue(MonitoringIntervalInSeconds.Value);
 55            }
 056            if (Endpoints != null)
 57            {
 058                writer.WritePropertyName("endpoints");
 059                writer.WriteStartArray();
 060                foreach (var item in Endpoints)
 61                {
 062                    writer.WriteObjectValue(item);
 63                }
 064                writer.WriteEndArray();
 65            }
 066            if (TestConfigurations != null)
 67            {
 068                writer.WritePropertyName("testConfigurations");
 069                writer.WriteStartArray();
 070                foreach (var item in TestConfigurations)
 71                {
 072                    writer.WriteObjectValue(item);
 73                }
 074                writer.WriteEndArray();
 75            }
 076            if (TestGroups != null)
 77            {
 078                writer.WritePropertyName("testGroups");
 079                writer.WriteStartArray();
 080                foreach (var item in TestGroups)
 81                {
 082                    writer.WriteObjectValue(item);
 83                }
 084                writer.WriteEndArray();
 85            }
 086            if (Outputs != null)
 87            {
 088                writer.WritePropertyName("outputs");
 089                writer.WriteStartArray();
 090                foreach (var item in Outputs)
 91                {
 092                    writer.WriteObjectValue(item);
 93                }
 094                writer.WriteEndArray();
 95            }
 096            if (Notes != null)
 97            {
 098                writer.WritePropertyName("notes");
 099                writer.WriteStringValue(Notes);
 100            }
 0101            writer.WriteEndObject();
 0102            writer.WriteEndObject();
 0103        }
 104    }
 105}