< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Properties()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeDigitalTwinsEndpointResource(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\digitaltwins\Azure.ResourceManager.DigitalTwins\src\Generated\Models\DigitalTwinsEndpointResource.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> DigitalTwinsInstance endpoint resource. </summary>
 11    public partial class DigitalTwinsEndpointResource : ExternalResource
 12    {
 13        /// <summary> Initializes a new instance of DigitalTwinsEndpointResource. </summary>
 014        public DigitalTwinsEndpointResource()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of DigitalTwinsEndpointResource. </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>
 22        /// <param name="properties"> DigitalTwinsInstance endpoint resource properties. </param>
 023        internal DigitalTwinsEndpointResource(string id, string name, string type, DigitalTwinsEndpointResourcePropertie
 24        {
 025            Properties = properties;
 026        }
 27
 28        /// <summary> DigitalTwinsInstance endpoint resource properties. </summary>
 029        public DigitalTwinsEndpointResourceProperties Properties { get; set; }
 30    }
 31}

C:\Git\azure-sdk-for-net\sdk\digitaltwins\Azure.ResourceManager.DigitalTwins\src\Generated\Models\DigitalTwinsEndpointResource.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 DigitalTwinsEndpointResource : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            if (Optional.IsDefined(Properties))
 19            {
 020                writer.WritePropertyName("properties");
 021                writer.WriteObjectValue(Properties);
 22            }
 023            writer.WriteEndObject();
 024        }
 25
 26        internal static DigitalTwinsEndpointResource DeserializeDigitalTwinsEndpointResource(JsonElement element)
 27        {
 028            Optional<DigitalTwinsEndpointResourceProperties> properties = default;
 029            Optional<string> id = default;
 030            Optional<string> name = default;
 031            Optional<string> type = default;
 032            foreach (var property in element.EnumerateObject())
 33            {
 034                if (property.NameEquals("properties"))
 35                {
 036                    properties = DigitalTwinsEndpointResourceProperties.DeserializeDigitalTwinsEndpointResourcePropertie
 037                    continue;
 38                }
 039                if (property.NameEquals("id"))
 40                {
 041                    id = property.Value.GetString();
 042                    continue;
 43                }
 044                if (property.NameEquals("name"))
 45                {
 046                    name = property.Value.GetString();
 047                    continue;
 48                }
 049                if (property.NameEquals("type"))
 50                {
 051                    type = property.Value.GetString();
 52                    continue;
 53                }
 54            }
 055            return new DigitalTwinsEndpointResource(id.Value, name.Value, type.Value, properties.Value);
 56        }
 57    }
 58}