< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_ProvisioningState()-0%100%
get_StartTime()-0%100%
get_MonitoringStatus()-0%100%
get_ConnectionMonitorType()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeConnectionMonitorResultProperties(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ConnectionMonitorResultProperties.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> Describes the properties of a connection monitor. </summary>
 14    public partial class ConnectionMonitorResultProperties : ConnectionMonitorParameters
 15    {
 16        /// <summary> Initializes a new instance of ConnectionMonitorResultProperties. </summary>
 017        public ConnectionMonitorResultProperties()
 18        {
 019        }
 20
 21        /// <summary> Initializes a new instance of ConnectionMonitorResultProperties. </summary>
 22        /// <param name="source"> Describes the source of connection monitor. </param>
 23        /// <param name="destination"> Describes the destination of connection monitor. </param>
 24        /// <param name="autoStart"> Determines if the connection monitor will start automatically once created. </param
 25        /// <param name="monitoringIntervalInSeconds"> Monitoring interval in seconds. </param>
 26        /// <param name="endpoints"> List of connection monitor endpoints. </param>
 27        /// <param name="testConfigurations"> List of connection monitor test configurations. </param>
 28        /// <param name="testGroups"> List of connection monitor test groups. </param>
 29        /// <param name="outputs"> List of connection monitor outputs. </param>
 30        /// <param name="notes"> Optional notes to be associated with the connection monitor. </param>
 31        /// <param name="provisioningState"> The provisioning state of the connection monitor. </param>
 32        /// <param name="startTime"> The date and time when the connection monitor was started. </param>
 33        /// <param name="monitoringStatus"> The monitoring status of the connection monitor. </param>
 34        /// <param name="connectionMonitorType"> Type of connection monitor. </param>
 035        internal ConnectionMonitorResultProperties(ConnectionMonitorSource source, ConnectionMonitorDestination destinat
 36        {
 037            ProvisioningState = provisioningState;
 038            StartTime = startTime;
 039            MonitoringStatus = monitoringStatus;
 040            ConnectionMonitorType = connectionMonitorType;
 041        }
 42
 43        /// <summary> The provisioning state of the connection monitor. </summary>
 044        public ProvisioningState? ProvisioningState { get; }
 45        /// <summary> The date and time when the connection monitor was started. </summary>
 046        public DateTimeOffset? StartTime { get; }
 47        /// <summary> The monitoring status of the connection monitor. </summary>
 048        public string MonitoringStatus { get; }
 49        /// <summary> Type of connection monitor. </summary>
 050        public ConnectionMonitorType? ConnectionMonitorType { get; }
 51    }
 52}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ConnectionMonitorResultProperties.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 ConnectionMonitorResultProperties : IUtf8JsonSerializable
 16    {
 17        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 18        {
 019            writer.WriteStartObject();
 020            if (ProvisioningState != null)
 21            {
 022                writer.WritePropertyName("provisioningState");
 023                writer.WriteStringValue(ProvisioningState.Value.ToString());
 24            }
 025            if (StartTime != null)
 26            {
 027                writer.WritePropertyName("startTime");
 028                writer.WriteStringValue(StartTime.Value, "O");
 29            }
 030            if (MonitoringStatus != null)
 31            {
 032                writer.WritePropertyName("monitoringStatus");
 033                writer.WriteStringValue(MonitoringStatus);
 34            }
 035            if (ConnectionMonitorType != null)
 36            {
 037                writer.WritePropertyName("connectionMonitorType");
 038                writer.WriteStringValue(ConnectionMonitorType.Value.ToString());
 39            }
 040            if (Source != null)
 41            {
 042                writer.WritePropertyName("source");
 043                writer.WriteObjectValue(Source);
 44            }
 045            if (Destination != null)
 46            {
 047                writer.WritePropertyName("destination");
 048                writer.WriteObjectValue(Destination);
 49            }
 050            if (AutoStart != null)
 51            {
 052                writer.WritePropertyName("autoStart");
 053                writer.WriteBooleanValue(AutoStart.Value);
 54            }
 055            if (MonitoringIntervalInSeconds != null)
 56            {
 057                writer.WritePropertyName("monitoringIntervalInSeconds");
 058                writer.WriteNumberValue(MonitoringIntervalInSeconds.Value);
 59            }
 060            if (Endpoints != null)
 61            {
 062                writer.WritePropertyName("endpoints");
 063                writer.WriteStartArray();
 064                foreach (var item in Endpoints)
 65                {
 066                    writer.WriteObjectValue(item);
 67                }
 068                writer.WriteEndArray();
 69            }
 070            if (TestConfigurations != null)
 71            {
 072                writer.WritePropertyName("testConfigurations");
 073                writer.WriteStartArray();
 074                foreach (var item in TestConfigurations)
 75                {
 076                    writer.WriteObjectValue(item);
 77                }
 078                writer.WriteEndArray();
 79            }
 080            if (TestGroups != null)
 81            {
 082                writer.WritePropertyName("testGroups");
 083                writer.WriteStartArray();
 084                foreach (var item in TestGroups)
 85                {
 086                    writer.WriteObjectValue(item);
 87                }
 088                writer.WriteEndArray();
 89            }
 090            if (Outputs != null)
 91            {
 092                writer.WritePropertyName("outputs");
 093                writer.WriteStartArray();
 094                foreach (var item in Outputs)
 95                {
 096                    writer.WriteObjectValue(item);
 97                }
 098                writer.WriteEndArray();
 99            }
 0100            if (Notes != null)
 101            {
 0102                writer.WritePropertyName("notes");
 0103                writer.WriteStringValue(Notes);
 104            }
 0105            writer.WriteEndObject();
 0106        }
 107
 108        internal static ConnectionMonitorResultProperties DeserializeConnectionMonitorResultProperties(JsonElement eleme
 109        {
 0110            ProvisioningState? provisioningState = default;
 0111            DateTimeOffset? startTime = default;
 0112            string monitoringStatus = default;
 0113            ConnectionMonitorType? connectionMonitorType = default;
 0114            ConnectionMonitorSource source = default;
 0115            ConnectionMonitorDestination destination = default;
 0116            bool? autoStart = default;
 0117            int? monitoringIntervalInSeconds = default;
 0118            IList<ConnectionMonitorEndpoint> endpoints = default;
 0119            IList<ConnectionMonitorTestConfiguration> testConfigurations = default;
 0120            IList<ConnectionMonitorTestGroup> testGroups = default;
 0121            IList<ConnectionMonitorOutput> outputs = default;
 0122            string notes = default;
 0123            foreach (var property in element.EnumerateObject())
 124            {
 0125                if (property.NameEquals("provisioningState"))
 126                {
 0127                    if (property.Value.ValueKind == JsonValueKind.Null)
 128                    {
 129                        continue;
 130                    }
 0131                    provisioningState = new ProvisioningState(property.Value.GetString());
 0132                    continue;
 133                }
 0134                if (property.NameEquals("startTime"))
 135                {
 0136                    if (property.Value.ValueKind == JsonValueKind.Null)
 137                    {
 138                        continue;
 139                    }
 0140                    startTime = property.Value.GetDateTimeOffset("O");
 0141                    continue;
 142                }
 0143                if (property.NameEquals("monitoringStatus"))
 144                {
 0145                    if (property.Value.ValueKind == JsonValueKind.Null)
 146                    {
 147                        continue;
 148                    }
 0149                    monitoringStatus = property.Value.GetString();
 0150                    continue;
 151                }
 0152                if (property.NameEquals("connectionMonitorType"))
 153                {
 0154                    if (property.Value.ValueKind == JsonValueKind.Null)
 155                    {
 156                        continue;
 157                    }
 0158                    connectionMonitorType = new ConnectionMonitorType(property.Value.GetString());
 0159                    continue;
 160                }
 0161                if (property.NameEquals("source"))
 162                {
 0163                    if (property.Value.ValueKind == JsonValueKind.Null)
 164                    {
 165                        continue;
 166                    }
 0167                    source = ConnectionMonitorSource.DeserializeConnectionMonitorSource(property.Value);
 0168                    continue;
 169                }
 0170                if (property.NameEquals("destination"))
 171                {
 0172                    if (property.Value.ValueKind == JsonValueKind.Null)
 173                    {
 174                        continue;
 175                    }
 0176                    destination = ConnectionMonitorDestination.DeserializeConnectionMonitorDestination(property.Value);
 0177                    continue;
 178                }
 0179                if (property.NameEquals("autoStart"))
 180                {
 0181                    if (property.Value.ValueKind == JsonValueKind.Null)
 182                    {
 183                        continue;
 184                    }
 0185                    autoStart = property.Value.GetBoolean();
 0186                    continue;
 187                }
 0188                if (property.NameEquals("monitoringIntervalInSeconds"))
 189                {
 0190                    if (property.Value.ValueKind == JsonValueKind.Null)
 191                    {
 192                        continue;
 193                    }
 0194                    monitoringIntervalInSeconds = property.Value.GetInt32();
 0195                    continue;
 196                }
 0197                if (property.NameEquals("endpoints"))
 198                {
 0199                    if (property.Value.ValueKind == JsonValueKind.Null)
 200                    {
 201                        continue;
 202                    }
 0203                    List<ConnectionMonitorEndpoint> array = new List<ConnectionMonitorEndpoint>();
 0204                    foreach (var item in property.Value.EnumerateArray())
 205                    {
 0206                        if (item.ValueKind == JsonValueKind.Null)
 207                        {
 0208                            array.Add(null);
 209                        }
 210                        else
 211                        {
 0212                            array.Add(ConnectionMonitorEndpoint.DeserializeConnectionMonitorEndpoint(item));
 213                        }
 214                    }
 0215                    endpoints = array;
 0216                    continue;
 217                }
 0218                if (property.NameEquals("testConfigurations"))
 219                {
 0220                    if (property.Value.ValueKind == JsonValueKind.Null)
 221                    {
 222                        continue;
 223                    }
 0224                    List<ConnectionMonitorTestConfiguration> array = new List<ConnectionMonitorTestConfiguration>();
 0225                    foreach (var item in property.Value.EnumerateArray())
 226                    {
 0227                        if (item.ValueKind == JsonValueKind.Null)
 228                        {
 0229                            array.Add(null);
 230                        }
 231                        else
 232                        {
 0233                            array.Add(ConnectionMonitorTestConfiguration.DeserializeConnectionMonitorTestConfiguration(i
 234                        }
 235                    }
 0236                    testConfigurations = array;
 0237                    continue;
 238                }
 0239                if (property.NameEquals("testGroups"))
 240                {
 0241                    if (property.Value.ValueKind == JsonValueKind.Null)
 242                    {
 243                        continue;
 244                    }
 0245                    List<ConnectionMonitorTestGroup> array = new List<ConnectionMonitorTestGroup>();
 0246                    foreach (var item in property.Value.EnumerateArray())
 247                    {
 0248                        if (item.ValueKind == JsonValueKind.Null)
 249                        {
 0250                            array.Add(null);
 251                        }
 252                        else
 253                        {
 0254                            array.Add(ConnectionMonitorTestGroup.DeserializeConnectionMonitorTestGroup(item));
 255                        }
 256                    }
 0257                    testGroups = array;
 0258                    continue;
 259                }
 0260                if (property.NameEquals("outputs"))
 261                {
 0262                    if (property.Value.ValueKind == JsonValueKind.Null)
 263                    {
 264                        continue;
 265                    }
 0266                    List<ConnectionMonitorOutput> array = new List<ConnectionMonitorOutput>();
 0267                    foreach (var item in property.Value.EnumerateArray())
 268                    {
 0269                        if (item.ValueKind == JsonValueKind.Null)
 270                        {
 0271                            array.Add(null);
 272                        }
 273                        else
 274                        {
 0275                            array.Add(ConnectionMonitorOutput.DeserializeConnectionMonitorOutput(item));
 276                        }
 277                    }
 0278                    outputs = array;
 0279                    continue;
 280                }
 0281                if (property.NameEquals("notes"))
 282                {
 0283                    if (property.Value.ValueKind == JsonValueKind.Null)
 284                    {
 285                        continue;
 286                    }
 0287                    notes = property.Value.GetString();
 288                    continue;
 289                }
 290            }
 0291            return new ConnectionMonitorResultProperties(source, destination, autoStart, monitoringIntervalInSeconds, en
 292        }
 293    }
 294}