< Summary

Class:Azure.ResourceManager.KeyVault.Models.Operation
Assembly:Azure.ResourceManager.KeyVault
File(s):C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.ResourceManager.KeyVault\src\Generated\Models\Operation.cs
C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.ResourceManager.KeyVault\src\Generated\Models\Operation.Serialization.cs
Covered lines:0
Uncovered lines:31
Coverable lines:31
Total lines:94
Line coverage:0% (0 of 31)
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_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\keyvault\Azure.ResourceManager.KeyVault\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.KeyVault.Models
 9{
 10    /// <summary> Key Vault 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\keyvault\Azure.ResourceManager.KeyVault\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.KeyVault.Models
 12{
 13    public partial class Operation
 14    {
 15        internal static Operation DeserializeOperation(JsonElement element)
 16        {
 017            Optional<string> name = default;
 018            Optional<OperationDisplay> display = default;
 019            Optional<string> origin = default;
 020            Optional<ServiceSpecification> serviceSpecification = default;
 021            foreach (var property in element.EnumerateObject())
 22            {
 023                if (property.NameEquals("name"))
 24                {
 025                    name = property.Value.GetString();
 026                    continue;
 27                }
 028                if (property.NameEquals("display"))
 29                {
 030                    display = OperationDisplay.DeserializeOperationDisplay(property.Value);
 031                    continue;
 32                }
 033                if (property.NameEquals("origin"))
 34                {
 035                    origin = property.Value.GetString();
 036                    continue;
 37                }
 038                if (property.NameEquals("properties"))
 39                {
 040                    foreach (var property0 in property.Value.EnumerateObject())
 41                    {
 042                        if (property0.NameEquals("serviceSpecification"))
 43                        {
 044                            serviceSpecification = ServiceSpecification.DeserializeServiceSpecification(property0.Value)
 45                            continue;
 46                        }
 47                    }
 48                    continue;
 49                }
 50            }
 051            return new Operation(name.Value, display.Value, origin.Value, serviceSpecification.Value);
 52        }
 53    }
 54}