internal static NotebookCellOutputItem DeserializeNotebookCellOutputItem(JsonElement element)
        {
            Optional <string> name           = default;
            Optional <int>    executionCount = default;
            CellOutputType    outputType     = default;
            Optional <object> text           = default;
            Optional <object> data           = default;
            Optional <object> metadata       = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("name"))
                {
                    name = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("execution_count"))
                {
                    executionCount = property.Value.GetInt32();
                    continue;
                }
                if (property.NameEquals("output_type"))
                {
                    outputType = new CellOutputType(property.Value.GetString());
                    continue;
                }
                if (property.NameEquals("text"))
                {
                    text = property.Value.GetObject();
                    continue;
                }
                if (property.NameEquals("data"))
                {
                    data = property.Value.GetObject();
                    continue;
                }
                if (property.NameEquals("metadata"))
                {
                    metadata = property.Value.GetObject();
                    continue;
                }
            }
            return(new NotebookCellOutputItem(name.Value, Optional.ToNullable(executionCount), outputType, text.Value, data.Value, metadata.Value));
        }
        internal static NotebookCellOutputItem DeserializeNotebookCellOutputItem(JsonElement element)
        {
            string         name           = default;
            int?           executionCount = default;
            CellOutputType outputType     = default;
            object         text           = default;
            object         data           = default;
            object         metadata       = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("name"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        continue;
                    }
                    name = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("execution_count"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        continue;
                    }
                    executionCount = property.Value.GetInt32();
                    continue;
                }
                if (property.NameEquals("output_type"))
                {
                    outputType = new CellOutputType(property.Value.GetString());
                    continue;
                }
                if (property.NameEquals("text"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        continue;
                    }
                    text = property.Value.GetObject();
                    continue;
                }
                if (property.NameEquals("data"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        continue;
                    }
                    data = property.Value.GetObject();
                    continue;
                }
                if (property.NameEquals("metadata"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        continue;
                    }
                    metadata = property.Value.GetObject();
                    continue;
                }
            }
            return(new NotebookCellOutputItem(name, executionCount, outputType, text, data, metadata));
        }