< Summary

Class:Azure.ResourceManager.DigitalTwins.Models.ExternalResource
Assembly:Azure.ResourceManager.DigitalTwins
File(s):C:\Git\azure-sdk-for-net\sdk\digitaltwins\Azure.ResourceManager.DigitalTwins\src\Generated\Models\ExternalResource.cs
C:\Git\azure-sdk-for-net\sdk\digitaltwins\Azure.ResourceManager.DigitalTwins\src\Generated\Models\ExternalResource.Serialization.cs
Covered lines:0
Uncovered lines:23
Coverable lines:23
Total lines:77
Line coverage:0% (0 of 23)
Covered branches:0
Total branches:8
Branch coverage:0% (0 of 8)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Id()-0%100%
get_Name()-0%100%
get_Type()-0%100%
DeserializeExternalResource(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\digitaltwins\Azure.ResourceManager.DigitalTwins\src\Generated\Models\ExternalResource.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.DigitalTwins.Models
 9{
 10    /// <summary> Definition of a Resource. </summary>
 11    public partial class ExternalResource
 12    {
 13        /// <summary> Initializes a new instance of ExternalResource. </summary>
 014        internal ExternalResource()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of ExternalResource. </summary>
 19        /// <param name="id"> The resource identifier. </param>
 20        /// <param name="name"> Extension resource name. </param>
 21        /// <param name="type"> The resource type. </param>
 022        internal ExternalResource(string id, string name, string type)
 23        {
 024            Id = id;
 025            Name = name;
 026            Type = type;
 027        }
 28
 29        /// <summary> The resource identifier. </summary>
 030        public string Id { get; }
 31        /// <summary> Extension resource name. </summary>
 032        public string Name { get; }
 33        /// <summary> The resource type. </summary>
 034        public string Type { get; }
 35    }
 36}

C:\Git\azure-sdk-for-net\sdk\digitaltwins\Azure.ResourceManager.DigitalTwins\src\Generated\Models\ExternalResource.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.DigitalTwins.Models
 12{
 13    public partial class ExternalResource
 14    {
 15        internal static ExternalResource DeserializeExternalResource(JsonElement element)
 16        {
 017            Optional<string> id = default;
 018            Optional<string> name = default;
 019            Optional<string> type = default;
 020            foreach (var property in element.EnumerateObject())
 21            {
 022                if (property.NameEquals("id"))
 23                {
 024                    id = property.Value.GetString();
 025                    continue;
 26                }
 027                if (property.NameEquals("name"))
 28                {
 029                    name = property.Value.GetString();
 030                    continue;
 31                }
 032                if (property.NameEquals("type"))
 33                {
 034                    type = property.Value.GetString();
 35                    continue;
 36                }
 37            }
 038            return new ExternalResource(id.Value, name.Value, type.Value);
 39        }
 40    }
 41}