< Summary

Class:Azure.ResourceManager.Network.Models.TrafficAnalyticsConfigurationProperties
Assembly:Azure.ResourceManager.Network
File(s):C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\TrafficAnalyticsConfigurationProperties.cs
C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\TrafficAnalyticsConfigurationProperties.Serialization.cs
Covered lines:0
Uncovered lines:58
Coverable lines:58
Total lines:148
Line coverage:0% (0 of 58)
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_Enabled()-0%100%
get_WorkspaceId()-0%100%
get_WorkspaceRegion()-0%100%
get_WorkspaceResourceId()-0%100%
get_TrafficAnalyticsInterval()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeTrafficAnalyticsConfigurationProperties(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\TrafficAnalyticsConfigurationProperties.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
 8namespace Azure.ResourceManager.Network.Models
 9{
 10    /// <summary> Parameters that define the configuration of traffic analytics. </summary>
 11    public partial class TrafficAnalyticsConfigurationProperties
 12    {
 13        /// <summary> Initializes a new instance of TrafficAnalyticsConfigurationProperties. </summary>
 014        public TrafficAnalyticsConfigurationProperties()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of TrafficAnalyticsConfigurationProperties. </summary>
 19        /// <param name="enabled"> Flag to enable/disable traffic analytics. </param>
 20        /// <param name="workspaceId"> The resource guid of the attached workspace. </param>
 21        /// <param name="workspaceRegion"> The location of the attached workspace. </param>
 22        /// <param name="workspaceResourceId"> Resource Id of the attached workspace. </param>
 23        /// <param name="trafficAnalyticsInterval"> The interval in minutes which would decide how frequently TA service
 024        internal TrafficAnalyticsConfigurationProperties(bool? enabled, string workspaceId, string workspaceRegion, stri
 25        {
 026            Enabled = enabled;
 027            WorkspaceId = workspaceId;
 028            WorkspaceRegion = workspaceRegion;
 029            WorkspaceResourceId = workspaceResourceId;
 030            TrafficAnalyticsInterval = trafficAnalyticsInterval;
 031        }
 32
 33        /// <summary> Flag to enable/disable traffic analytics. </summary>
 034        public bool? Enabled { get; set; }
 35        /// <summary> The resource guid of the attached workspace. </summary>
 036        public string WorkspaceId { get; set; }
 37        /// <summary> The location of the attached workspace. </summary>
 038        public string WorkspaceRegion { get; set; }
 39        /// <summary> Resource Id of the attached workspace. </summary>
 040        public string WorkspaceResourceId { get; set; }
 41        /// <summary> The interval in minutes which would decide how frequently TA service should do flow analytics. </s
 042        public int? TrafficAnalyticsInterval { get; set; }
 43    }
 44}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\TrafficAnalyticsConfigurationProperties.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 TrafficAnalyticsConfigurationProperties : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            if (Enabled != null)
 19            {
 020                writer.WritePropertyName("enabled");
 021                writer.WriteBooleanValue(Enabled.Value);
 22            }
 023            if (WorkspaceId != null)
 24            {
 025                writer.WritePropertyName("workspaceId");
 026                writer.WriteStringValue(WorkspaceId);
 27            }
 028            if (WorkspaceRegion != null)
 29            {
 030                writer.WritePropertyName("workspaceRegion");
 031                writer.WriteStringValue(WorkspaceRegion);
 32            }
 033            if (WorkspaceResourceId != null)
 34            {
 035                writer.WritePropertyName("workspaceResourceId");
 036                writer.WriteStringValue(WorkspaceResourceId);
 37            }
 038            if (TrafficAnalyticsInterval != null)
 39            {
 040                writer.WritePropertyName("trafficAnalyticsInterval");
 041                writer.WriteNumberValue(TrafficAnalyticsInterval.Value);
 42            }
 043            writer.WriteEndObject();
 044        }
 45
 46        internal static TrafficAnalyticsConfigurationProperties DeserializeTrafficAnalyticsConfigurationProperties(JsonE
 47        {
 048            bool? enabled = default;
 049            string workspaceId = default;
 050            string workspaceRegion = default;
 051            string workspaceResourceId = default;
 052            int? trafficAnalyticsInterval = default;
 053            foreach (var property in element.EnumerateObject())
 54            {
 055                if (property.NameEquals("enabled"))
 56                {
 057                    if (property.Value.ValueKind == JsonValueKind.Null)
 58                    {
 59                        continue;
 60                    }
 061                    enabled = property.Value.GetBoolean();
 062                    continue;
 63                }
 064                if (property.NameEquals("workspaceId"))
 65                {
 066                    if (property.Value.ValueKind == JsonValueKind.Null)
 67                    {
 68                        continue;
 69                    }
 070                    workspaceId = property.Value.GetString();
 071                    continue;
 72                }
 073                if (property.NameEquals("workspaceRegion"))
 74                {
 075                    if (property.Value.ValueKind == JsonValueKind.Null)
 76                    {
 77                        continue;
 78                    }
 079                    workspaceRegion = property.Value.GetString();
 080                    continue;
 81                }
 082                if (property.NameEquals("workspaceResourceId"))
 83                {
 084                    if (property.Value.ValueKind == JsonValueKind.Null)
 85                    {
 86                        continue;
 87                    }
 088                    workspaceResourceId = property.Value.GetString();
 089                    continue;
 90                }
 091                if (property.NameEquals("trafficAnalyticsInterval"))
 92                {
 093                    if (property.Value.ValueKind == JsonValueKind.Null)
 94                    {
 95                        continue;
 96                    }
 097                    trafficAnalyticsInterval = property.Value.GetInt32();
 98                    continue;
 99                }
 100            }
 0101            return new TrafficAnalyticsConfigurationProperties(enabled, workspaceId, workspaceRegion, workspaceResourceI
 102        }
 103    }
 104}