< Summary

Class:Azure.ResourceManager.Storage.Models.Operation
Assembly:Azure.ResourceManager.Storage
File(s):C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\Operation.cs
C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\Operation.Serialization.cs
Covered lines:0
Uncovered lines:35
Coverable lines:35
Total lines:110
Line coverage:0% (0 of 35)
Covered branches:0
Total branches:22
Branch coverage:0% (0 of 22)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Name()-0%100%
get_Display()-0%100%
get_Origin()-0%100%
get_ServiceSpecification()-0%100%
DeserializeOperation(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\Operation.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.Storage.Models
 9{
 10    /// <summary> Storage REST API operation definition. </summary>
 11    public partial class Operation
 12    {
 13        /// <summary> Initializes a new instance of Operation. </summary>
 014        internal Operation()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of Operation. </summary>
 19        /// <param name="name"> Operation name: {provider}/{resource}/{operation}. </param>
 20        /// <param name="display"> Display metadata associated with the operation. </param>
 21        /// <param name="origin"> The origin of operations. </param>
 22        /// <param name="serviceSpecification"> One property of operation, include metric specifications. </param>
 023        internal Operation(string name, OperationDisplay display, string origin, ServiceSpecification serviceSpecificati
 24        {
 025            Name = name;
 026            Display = display;
 027            Origin = origin;
 028            ServiceSpecification = serviceSpecification;
 029        }
 30
 31        /// <summary> Operation name: {provider}/{resource}/{operation}. </summary>
 032        public string Name { get; }
 33        /// <summary> Display metadata associated with the operation. </summary>
 034        public OperationDisplay Display { get; }
 35        /// <summary> The origin of operations. </summary>
 036        public string Origin { get; }
 37        /// <summary> One property of operation, include metric specifications. </summary>
 038        public ServiceSpecification ServiceSpecification { get; }
 39    }
 40}

C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\Operation.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.Storage.Models
 12{
 13    public partial class Operation
 14    {
 15        internal static Operation DeserializeOperation(JsonElement element)
 16        {
 017            string name = default;
 018            OperationDisplay display = default;
 019            string origin = default;
 020            ServiceSpecification serviceSpecification = default;
 021            foreach (var property in element.EnumerateObject())
 22            {
 023                if (property.NameEquals("name"))
 24                {
 025                    if (property.Value.ValueKind == JsonValueKind.Null)
 26                    {
 27                        continue;
 28                    }
 029                    name = property.Value.GetString();
 030                    continue;
 31                }
 032                if (property.NameEquals("display"))
 33                {
 034                    if (property.Value.ValueKind == JsonValueKind.Null)
 35                    {
 36                        continue;
 37                    }
 038                    display = OperationDisplay.DeserializeOperationDisplay(property.Value);
 039                    continue;
 40                }
 041                if (property.NameEquals("origin"))
 42                {
 043                    if (property.Value.ValueKind == JsonValueKind.Null)
 44                    {
 45                        continue;
 46                    }
 047                    origin = property.Value.GetString();
 048                    continue;
 49                }
 050                if (property.NameEquals("properties"))
 51                {
 052                    foreach (var property0 in property.Value.EnumerateObject())
 53                    {
 054                        if (property0.NameEquals("serviceSpecification"))
 55                        {
 056                            if (property0.Value.ValueKind == JsonValueKind.Null)
 57                            {
 58                                continue;
 59                            }
 060                            serviceSpecification = ServiceSpecification.DeserializeServiceSpecification(property0.Value)
 61                            continue;
 62                        }
 63                    }
 64                    continue;
 65                }
 66            }
 067            return new Operation(name, display, origin, serviceSpecification);
 68        }
 69    }
 70}