< Summary

Class:Azure.ResourceManager.Compute.Models.ComputeOperationValue
Assembly:Azure.ResourceManager.Compute
File(s):C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\ComputeOperationValue.cs
C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\ComputeOperationValue.Serialization.cs
Covered lines:41
Uncovered lines:8
Coverable lines:49
Total lines:138
Line coverage:83.6% (41 of 49)
Covered branches:30
Total branches:30
Branch coverage:100% (30 of 30)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_Origin()-0%100%
get_Name()-0%100%
get_Operation()-0%100%
get_Resource()-0%100%
get_Description()-0%100%
get_Provider()-0%100%
DeserializeComputeOperationValue(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\ComputeOperationValue.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.Compute.Models
 9{
 10    /// <summary> Describes the properties of a Compute Operation value. </summary>
 11    public partial class ComputeOperationValue
 12    {
 13        /// <summary> Initializes a new instance of ComputeOperationValue. </summary>
 014        internal ComputeOperationValue()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of ComputeOperationValue. </summary>
 19        /// <param name="origin"> The origin of the compute operation. </param>
 20        /// <param name="name"> The name of the compute operation. </param>
 21        /// <param name="operation"> The display name of the compute operation. </param>
 22        /// <param name="resource"> The display name of the resource the operation applies to. </param>
 23        /// <param name="description"> The description of the operation. </param>
 24        /// <param name="provider"> The resource provider for the operation. </param>
 72825        internal ComputeOperationValue(string origin, string name, string operation, string resource, string description
 26        {
 72827            Origin = origin;
 72828            Name = name;
 72829            Operation = operation;
 72830            Resource = resource;
 72831            Description = description;
 72832            Provider = provider;
 72833        }
 34
 35        /// <summary> The origin of the compute operation. </summary>
 036        public string Origin { get; }
 37        /// <summary> The name of the compute operation. </summary>
 038        public string Name { get; }
 39        /// <summary> The display name of the compute operation. </summary>
 040        public string Operation { get; }
 41        /// <summary> The display name of the resource the operation applies to. </summary>
 042        public string Resource { get; }
 43        /// <summary> The description of the operation. </summary>
 044        public string Description { get; }
 45        /// <summary> The resource provider for the operation. </summary>
 046        public string Provider { get; }
 47    }
 48}

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\ComputeOperationValue.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.Compute.Models
 12{
 13    public partial class ComputeOperationValue
 14    {
 15        internal static ComputeOperationValue DeserializeComputeOperationValue(JsonElement element)
 16        {
 72817            string origin = default;
 72818            string name = default;
 72819            string operation = default;
 72820            string resource = default;
 72821            string description = default;
 72822            string provider = default;
 731223            foreach (var property in element.EnumerateObject())
 24            {
 292825                if (property.NameEquals("origin"))
 26                {
 72827                    if (property.Value.ValueKind == JsonValueKind.Null)
 28                    {
 29                        continue;
 30                    }
 72831                    origin = property.Value.GetString();
 72832                    continue;
 33                }
 220034                if (property.NameEquals("name"))
 35                {
 72836                    if (property.Value.ValueKind == JsonValueKind.Null)
 37                    {
 38                        continue;
 39                    }
 72840                    name = property.Value.GetString();
 72841                    continue;
 42                }
 147243                if (property.NameEquals("display"))
 44                {
 728045                    foreach (var property0 in property.Value.EnumerateObject())
 46                    {
 291247                        if (property0.NameEquals("operation"))
 48                        {
 72849                            if (property0.Value.ValueKind == JsonValueKind.Null)
 50                            {
 51                                continue;
 52                            }
 72853                            operation = property0.Value.GetString();
 72854                            continue;
 55                        }
 218456                        if (property0.NameEquals("resource"))
 57                        {
 72858                            if (property0.Value.ValueKind == JsonValueKind.Null)
 59                            {
 60                                continue;
 61                            }
 72862                            resource = property0.Value.GetString();
 72863                            continue;
 64                        }
 145665                        if (property0.NameEquals("description"))
 66                        {
 72867                            if (property0.Value.ValueKind == JsonValueKind.Null)
 68                            {
 69                                continue;
 70                            }
 72871                            description = property0.Value.GetString();
 72872                            continue;
 73                        }
 72874                        if (property0.NameEquals("provider"))
 75                        {
 72876                            if (property0.Value.ValueKind == JsonValueKind.Null)
 77                            {
 78                                continue;
 79                            }
 72880                            provider = property0.Value.GetString();
 81                            continue;
 82                        }
 83                    }
 84                    continue;
 85                }
 86            }
 72887            return new ComputeOperationValue(origin, name, operation, resource, description, provider);
 88        }
 89    }
 90}