< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_MetricSpecifications()-0%100%
get_LogSpecifications()-0%100%
DeserializeOperationPropertiesFormatServiceSpecification(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\OperationPropertiesFormatServiceSpecification.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> Specification of the service. </summary>
 13    public partial class OperationPropertiesFormatServiceSpecification
 14    {
 15        /// <summary> Initializes a new instance of OperationPropertiesFormatServiceSpecification. </summary>
 016        internal OperationPropertiesFormatServiceSpecification()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of OperationPropertiesFormatServiceSpecification. </summary>
 21        /// <param name="metricSpecifications"> Operation service specification. </param>
 22        /// <param name="logSpecifications"> Operation log specification. </param>
 023        internal OperationPropertiesFormatServiceSpecification(IReadOnlyList<MetricSpecification> metricSpecifications, 
 24        {
 025            MetricSpecifications = metricSpecifications;
 026            LogSpecifications = logSpecifications;
 027        }
 28
 29        /// <summary> Operation service specification. </summary>
 030        public IReadOnlyList<MetricSpecification> MetricSpecifications { get; }
 31        /// <summary> Operation log specification. </summary>
 032        public IReadOnlyList<LogSpecification> LogSpecifications { get; }
 33    }
 34}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\OperationPropertiesFormatServiceSpecification.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.Collections.Generic;
 9using System.Text.Json;
 10using Azure.Core;
 11
 12namespace Azure.ResourceManager.Network.Models
 13{
 14    public partial class OperationPropertiesFormatServiceSpecification
 15    {
 16        internal static OperationPropertiesFormatServiceSpecification DeserializeOperationPropertiesFormatServiceSpecifi
 17        {
 018            IReadOnlyList<MetricSpecification> metricSpecifications = default;
 019            IReadOnlyList<LogSpecification> logSpecifications = default;
 020            foreach (var property in element.EnumerateObject())
 21            {
 022                if (property.NameEquals("metricSpecifications"))
 23                {
 024                    if (property.Value.ValueKind == JsonValueKind.Null)
 25                    {
 26                        continue;
 27                    }
 028                    List<MetricSpecification> array = new List<MetricSpecification>();
 029                    foreach (var item in property.Value.EnumerateArray())
 30                    {
 031                        if (item.ValueKind == JsonValueKind.Null)
 32                        {
 033                            array.Add(null);
 34                        }
 35                        else
 36                        {
 037                            array.Add(MetricSpecification.DeserializeMetricSpecification(item));
 38                        }
 39                    }
 040                    metricSpecifications = array;
 041                    continue;
 42                }
 043                if (property.NameEquals("logSpecifications"))
 44                {
 045                    if (property.Value.ValueKind == JsonValueKind.Null)
 46                    {
 47                        continue;
 48                    }
 049                    List<LogSpecification> array = new List<LogSpecification>();
 050                    foreach (var item in property.Value.EnumerateArray())
 51                    {
 052                        if (item.ValueKind == JsonValueKind.Null)
 53                        {
 054                            array.Add(null);
 55                        }
 56                        else
 57                        {
 058                            array.Add(LogSpecification.DeserializeLogSpecification(item));
 59                        }
 60                    }
 061                    logSpecifications = array;
 62                    continue;
 63                }
 64            }
 065            return new OperationPropertiesFormatServiceSpecification(metricSpecifications, logSpecifications);
 66        }
 67    }
 68}