< Summary

Class:Azure.Analytics.Synapse.Artifacts.Models.SubResource
Assembly:Azure.Analytics.Synapse.Artifacts
File(s):C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\SubResource.cs
C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\SubResource.Serialization.cs
Covered lines:8
Uncovered lines:24
Coverable lines:32
Total lines:93
Line coverage:25% (8 of 32)
Covered branches:0
Total branches:10
Branch coverage:0% (0 of 10)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_Id()-100%100%
get_Name()-100%100%
get_Type()-0%100%
get_Etag()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%100%
DeserializeSubResource(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\SubResource.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.Analytics.Synapse.Artifacts.Models
 9{
 10    /// <summary> Azure Synapse nested resource, which belongs to a workspace. </summary>
 11    public partial class SubResource
 12    {
 13        /// <summary> Initializes a new instance of SubResource. </summary>
 014        public SubResource()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of SubResource. </summary>
 19        /// <param name="id"> The resource identifier. </param>
 20        /// <param name="name"> The resource name. </param>
 21        /// <param name="type"> The resource type. </param>
 22        /// <param name="etag"> Etag identifies change in the resource. </param>
 3223        internal SubResource(string id, string name, string type, string etag)
 24        {
 3225            Id = id;
 3226            Name = name;
 3227            Type = type;
 3228            Etag = etag;
 3229        }
 30
 31        /// <summary> The resource identifier. </summary>
 3232        public string Id { get; }
 33        /// <summary> The resource name. </summary>
 4834        public string Name { get; }
 35        /// <summary> The resource type. </summary>
 036        public string Type { get; }
 37        /// <summary> Etag identifies change in the resource. </summary>
 038        public string Etag { get; }
 39    }
 40}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\SubResource.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.Analytics.Synapse.Artifacts.Models
 12{
 13    public partial class SubResource : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            writer.WriteEndObject();
 019        }
 20
 21        internal static SubResource DeserializeSubResource(JsonElement element)
 22        {
 023            Optional<string> id = default;
 024            Optional<string> name = default;
 025            Optional<string> type = default;
 026            Optional<string> etag = default;
 027            foreach (var property in element.EnumerateObject())
 28            {
 029                if (property.NameEquals("id"))
 30                {
 031                    id = property.Value.GetString();
 032                    continue;
 33                }
 034                if (property.NameEquals("name"))
 35                {
 036                    name = property.Value.GetString();
 037                    continue;
 38                }
 039                if (property.NameEquals("type"))
 40                {
 041                    type = property.Value.GetString();
 042                    continue;
 43                }
 044                if (property.NameEquals("etag"))
 45                {
 046                    etag = property.Value.GetString();
 47                    continue;
 48                }
 49            }
 050            return new SubResource(id.Value, name.Value, type.Value, etag.Value);
 51        }
 52    }
 53}