< Summary

Class:Azure.Analytics.Synapse.Artifacts.Models.DatasetResource
Assembly:Azure.Analytics.Synapse.Artifacts
File(s):C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\DatasetResource.cs
C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\DatasetResource.Serialization.cs
Covered lines:0
Uncovered lines:35
Coverable lines:35
Total lines:103
Line coverage:0% (0 of 35)
Covered branches:0
Total branches:14
Branch coverage:0% (0 of 14)

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\DatasetResource.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;
 9
 10namespace Azure.Analytics.Synapse.Artifacts.Models
 11{
 12    /// <summary> Dataset resource type. </summary>
 13    public partial class DatasetResource : SubResource
 14    {
 15        /// <summary> Initializes a new instance of DatasetResource. </summary>
 16        /// <param name="properties"> Dataset properties. </param>
 17        /// <exception cref="ArgumentNullException"> <paramref name="properties"/> is null. </exception>
 018        public DatasetResource(Dataset properties)
 19        {
 020            if (properties == null)
 21            {
 022                throw new ArgumentNullException(nameof(properties));
 23            }
 24
 025            Properties = properties;
 026        }
 27
 28        /// <summary> Initializes a new instance of DatasetResource. </summary>
 29        /// <param name="id"> The resource identifier. </param>
 30        /// <param name="name"> The resource name. </param>
 31        /// <param name="type"> The resource type. </param>
 32        /// <param name="etag"> Etag identifies change in the resource. </param>
 33        /// <param name="properties"> Dataset properties. </param>
 034        internal DatasetResource(string id, string name, string type, string etag, Dataset properties) : base(id, name, 
 35        {
 036            Properties = properties;
 037        }
 38
 39        /// <summary> Dataset properties. </summary>
 040        public Dataset Properties { get; set; }
 41    }
 42}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\DatasetResource.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 DatasetResource : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            writer.WritePropertyName("properties");
 019            writer.WriteObjectValue(Properties);
 020            writer.WriteEndObject();
 021        }
 22
 23        internal static DatasetResource DeserializeDatasetResource(JsonElement element)
 24        {
 025            Dataset properties = default;
 026            Optional<string> id = default;
 027            Optional<string> name = default;
 028            Optional<string> type = default;
 029            Optional<string> etag = default;
 030            foreach (var property in element.EnumerateObject())
 31            {
 032                if (property.NameEquals("properties"))
 33                {
 034                    properties = Dataset.DeserializeDataset(property.Value);
 035                    continue;
 36                }
 037                if (property.NameEquals("id"))
 38                {
 039                    id = property.Value.GetString();
 040                    continue;
 41                }
 042                if (property.NameEquals("name"))
 43                {
 044                    name = property.Value.GetString();
 045                    continue;
 46                }
 047                if (property.NameEquals("type"))
 48                {
 049                    type = property.Value.GetString();
 050                    continue;
 51                }
 052                if (property.NameEquals("etag"))
 53                {
 054                    etag = property.Value.GetString();
 55                    continue;
 56                }
 57            }
 058            return new DatasetResource(id.Value, name.Value, type.Value, etag.Value, properties);
 59        }
 60    }
 61}