< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Type()-0%100%
get_Version()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeFlowLogFormatParameters(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\FlowLogFormatParameters.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 flow log format. </summary>
 11    public partial class FlowLogFormatParameters
 12    {
 13        /// <summary> Initializes a new instance of FlowLogFormatParameters. </summary>
 014        public FlowLogFormatParameters()
 15        {
 016            Type = "JSON";
 017        }
 18
 19        /// <summary> Initializes a new instance of FlowLogFormatParameters. </summary>
 20        /// <param name="type"> The file type of flow log. </param>
 21        /// <param name="version"> The version (revision) of the flow log. </param>
 022        internal FlowLogFormatParameters(string type, int? version)
 23        {
 024            Type = type;
 025            Version = version;
 026        }
 27
 28        /// <summary> The file type of flow log. </summary>
 029        public string Type { get; set; }
 30        /// <summary> The version (revision) of the flow log. </summary>
 031        public int? Version { get; set; }
 32    }
 33}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\FlowLogFormatParameters.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 FlowLogFormatParameters : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            if (Type != null)
 19            {
 020                writer.WritePropertyName("type");
 021                writer.WriteStringValue(Type);
 22            }
 023            if (Version != null)
 24            {
 025                writer.WritePropertyName("version");
 026                writer.WriteNumberValue(Version.Value);
 27            }
 028            writer.WriteEndObject();
 029        }
 30
 31        internal static FlowLogFormatParameters DeserializeFlowLogFormatParameters(JsonElement element)
 32        {
 033            string type = default;
 034            int? version = default;
 035            foreach (var property in element.EnumerateObject())
 36            {
 037                if (property.NameEquals("type"))
 38                {
 039                    if (property.Value.ValueKind == JsonValueKind.Null)
 40                    {
 41                        continue;
 42                    }
 043                    type = property.Value.GetString();
 044                    continue;
 45                }
 046                if (property.NameEquals("version"))
 47                {
 048                    if (property.Value.ValueKind == JsonValueKind.Null)
 49                    {
 50                        continue;
 51                    }
 052                    version = property.Value.GetInt32();
 53                    continue;
 54                }
 55            }
 056            return new FlowLogFormatParameters(type, version);
 57        }
 58    }
 59}