< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%100%
.ctor(...)-0%100%
get_Name()-0%100%
get_ExecutionCount()-0%100%
get_OutputType()-0%100%
get_Text()-0%100%
get_Data()-0%100%
get_Metadata()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeNotebookCellOutputItem(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\NotebookCellOutputItem.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> An item of the notebook cell execution output. </summary>
 11    public partial class NotebookCellOutputItem
 12    {
 13        /// <summary> Initializes a new instance of NotebookCellOutputItem. </summary>
 14        /// <param name="outputType"> Execution, display, or stream outputs. </param>
 015        public NotebookCellOutputItem(CellOutputType outputType)
 16        {
 017            OutputType = outputType;
 018        }
 19
 20        /// <summary> Initializes a new instance of NotebookCellOutputItem. </summary>
 21        /// <param name="name"> For output_type=stream, determines the name of stream (stdout / stderr). </param>
 22        /// <param name="executionCount"> Execution sequence number. </param>
 23        /// <param name="outputType"> Execution, display, or stream outputs. </param>
 24        /// <param name="text"> For output_type=stream, the stream&apos;s text output, represented as a string or an arr
 25        /// <param name="data"> Output data. Use MIME type as key, and content as value. </param>
 26        /// <param name="metadata"> Metadata for the output item. </param>
 027        internal NotebookCellOutputItem(string name, int? executionCount, CellOutputType outputType, object text, object
 28        {
 029            Name = name;
 030            ExecutionCount = executionCount;
 031            OutputType = outputType;
 032            Text = text;
 033            Data = data;
 034            Metadata = metadata;
 035        }
 36
 37        /// <summary> For output_type=stream, determines the name of stream (stdout / stderr). </summary>
 038        public string Name { get; set; }
 39        /// <summary> Execution sequence number. </summary>
 040        public int? ExecutionCount { get; set; }
 41        /// <summary> Execution, display, or stream outputs. </summary>
 042        public CellOutputType OutputType { get; set; }
 43        /// <summary> For output_type=stream, the stream&apos;s text output, represented as a string or an array of stri
 044        public object Text { get; set; }
 45        /// <summary> Output data. Use MIME type as key, and content as value. </summary>
 046        public object Data { get; set; }
 47        /// <summary> Metadata for the output item. </summary>
 048        public object Metadata { get; set; }
 49    }
 50}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\NotebookCellOutputItem.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 NotebookCellOutputItem : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            if (Optional.IsDefined(Name))
 19            {
 020                writer.WritePropertyName("name");
 021                writer.WriteStringValue(Name);
 22            }
 023            if (Optional.IsDefined(ExecutionCount))
 24            {
 025                writer.WritePropertyName("execution_count");
 026                writer.WriteNumberValue(ExecutionCount.Value);
 27            }
 028            writer.WritePropertyName("output_type");
 029            writer.WriteStringValue(OutputType.ToString());
 030            if (Optional.IsDefined(Text))
 31            {
 032                writer.WritePropertyName("text");
 033                writer.WriteObjectValue(Text);
 34            }
 035            if (Optional.IsDefined(Data))
 36            {
 037                writer.WritePropertyName("data");
 038                writer.WriteObjectValue(Data);
 39            }
 040            if (Optional.IsDefined(Metadata))
 41            {
 042                writer.WritePropertyName("metadata");
 043                writer.WriteObjectValue(Metadata);
 44            }
 045            writer.WriteEndObject();
 046        }
 47
 48        internal static NotebookCellOutputItem DeserializeNotebookCellOutputItem(JsonElement element)
 49        {
 050            Optional<string> name = default;
 051            Optional<int> executionCount = default;
 052            CellOutputType outputType = default;
 053            Optional<object> text = default;
 054            Optional<object> data = default;
 055            Optional<object> metadata = default;
 056            foreach (var property in element.EnumerateObject())
 57            {
 058                if (property.NameEquals("name"))
 59                {
 060                    name = property.Value.GetString();
 061                    continue;
 62                }
 063                if (property.NameEquals("execution_count"))
 64                {
 065                    executionCount = property.Value.GetInt32();
 066                    continue;
 67                }
 068                if (property.NameEquals("output_type"))
 69                {
 070                    outputType = new CellOutputType(property.Value.GetString());
 071                    continue;
 72                }
 073                if (property.NameEquals("text"))
 74                {
 075                    text = property.Value.GetObject();
 076                    continue;
 77                }
 078                if (property.NameEquals("data"))
 79                {
 080                    data = property.Value.GetObject();
 081                    continue;
 82                }
 083                if (property.NameEquals("metadata"))
 84                {
 085                    metadata = property.Value.GetObject();
 86                    continue;
 87                }
 88            }
 089            return new NotebookCellOutputItem(name.Value, Optional.ToNullable(executionCount), outputType, text.Value, d
 90        }
 91    }
 92}