| | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 2 | | // Licensed under the MIT License. |
| | 3 | |
|
| | 4 | | // <auto-generated/> |
| | 5 | |
|
| | 6 | | #nullable disable |
| | 7 | |
|
| | 8 | | using System; |
| | 9 | | using System.Collections; |
| | 10 | | using System.Collections.Generic; |
| | 11 | | using System.Linq; |
| | 12 | | using Azure.Core; |
| | 13 | |
|
| | 14 | | namespace Azure.Analytics.Synapse.Artifacts.Models |
| | 15 | | { |
| | 16 | | /// <summary> Notebook cell. </summary> |
| | 17 | | public partial class NotebookCell : IDictionary<string, object> |
| | 18 | | { |
| | 19 | | /// <summary> Initializes a new instance of NotebookCell. </summary> |
| | 20 | | /// <param name="cellType"> String identifying the type of cell. </param> |
| | 21 | | /// <param name="metadata"> Cell-level metadata. </param> |
| | 22 | | /// <param name="source"> Contents of the cell, represented as an array of lines. </param> |
| | 23 | | /// <exception cref="ArgumentNullException"> <paramref name="cellType"/>, <paramref name="metadata"/>, or <param |
| 0 | 24 | | public NotebookCell(string cellType, object metadata, IEnumerable<string> source) |
| | 25 | | { |
| 0 | 26 | | if (cellType == null) |
| | 27 | | { |
| 0 | 28 | | throw new ArgumentNullException(nameof(cellType)); |
| | 29 | | } |
| 0 | 30 | | if (metadata == null) |
| | 31 | | { |
| 0 | 32 | | throw new ArgumentNullException(nameof(metadata)); |
| | 33 | | } |
| 0 | 34 | | if (source == null) |
| | 35 | | { |
| 0 | 36 | | throw new ArgumentNullException(nameof(source)); |
| | 37 | | } |
| | 38 | |
|
| 0 | 39 | | CellType = cellType; |
| 0 | 40 | | Metadata = metadata; |
| 0 | 41 | | Source = source.ToList(); |
| 0 | 42 | | Outputs = new ChangeTrackingList<NotebookCellOutputItem>(); |
| 0 | 43 | | AdditionalProperties = new ChangeTrackingDictionary<string, object>(); |
| 0 | 44 | | } |
| | 45 | |
|
| | 46 | | /// <summary> Initializes a new instance of NotebookCell. </summary> |
| | 47 | | /// <param name="cellType"> String identifying the type of cell. </param> |
| | 48 | | /// <param name="metadata"> Cell-level metadata. </param> |
| | 49 | | /// <param name="source"> Contents of the cell, represented as an array of lines. </param> |
| | 50 | | /// <param name="attachments"> Attachments associated with the cell. </param> |
| | 51 | | /// <param name="outputs"> Cell-level output items. </param> |
| | 52 | | /// <param name="additionalProperties"> . </param> |
| 16 | 53 | | internal NotebookCell(string cellType, object metadata, IList<string> source, object attachments, IList<Notebook |
| | 54 | | { |
| 16 | 55 | | CellType = cellType; |
| 16 | 56 | | Metadata = metadata; |
| 16 | 57 | | Source = source; |
| 16 | 58 | | Attachments = attachments; |
| 16 | 59 | | Outputs = outputs; |
| 16 | 60 | | AdditionalProperties = additionalProperties; |
| 16 | 61 | | } |
| | 62 | |
|
| | 63 | | /// <summary> String identifying the type of cell. </summary> |
| 0 | 64 | | public string CellType { get; set; } |
| | 65 | | /// <summary> Cell-level metadata. </summary> |
| 0 | 66 | | public object Metadata { get; set; } |
| | 67 | | /// <summary> Contents of the cell, represented as an array of lines. </summary> |
| 0 | 68 | | public IList<string> Source { get; } |
| | 69 | | /// <summary> Attachments associated with the cell. </summary> |
| 0 | 70 | | public object Attachments { get; set; } |
| | 71 | | /// <summary> Cell-level output items. </summary> |
| 0 | 72 | | public IList<NotebookCellOutputItem> Outputs { get; } |
| 0 | 73 | | internal IDictionary<string, object> AdditionalProperties { get; } |
| | 74 | | /// <inheritdoc /> |
| 0 | 75 | | public IEnumerator<KeyValuePair<string, object>> GetEnumerator() => AdditionalProperties.GetEnumerator(); |
| | 76 | | /// <inheritdoc /> |
| 0 | 77 | | IEnumerator IEnumerable.GetEnumerator() => AdditionalProperties.GetEnumerator(); |
| | 78 | | /// <inheritdoc /> |
| 0 | 79 | | public bool TryGetValue(string key, out object value) => AdditionalProperties.TryGetValue(key, out value); |
| | 80 | | /// <inheritdoc /> |
| 0 | 81 | | public bool ContainsKey(string key) => AdditionalProperties.ContainsKey(key); |
| | 82 | | /// <inheritdoc /> |
| 0 | 83 | | public ICollection<string> Keys => AdditionalProperties.Keys; |
| | 84 | | /// <inheritdoc /> |
| 0 | 85 | | public ICollection<object> Values => AdditionalProperties.Values; |
| | 86 | | /// <inheritdoc /> |
| 0 | 87 | | int ICollection<KeyValuePair<string, object>>.Count => AdditionalProperties.Count; |
| | 88 | | /// <inheritdoc /> |
| 0 | 89 | | public void Add(string key, object value) => AdditionalProperties.Add(key, value); |
| | 90 | | /// <inheritdoc /> |
| 0 | 91 | | public bool Remove(string key) => AdditionalProperties.Remove(key); |
| | 92 | | /// <inheritdoc /> |
| 0 | 93 | | bool ICollection<KeyValuePair<string, object>>.IsReadOnly => AdditionalProperties.IsReadOnly; |
| | 94 | | /// <inheritdoc /> |
| 0 | 95 | | void ICollection<KeyValuePair<string, object>>.Add(KeyValuePair<string, object> value) => AdditionalProperties.A |
| | 96 | | /// <inheritdoc /> |
| 0 | 97 | | bool ICollection<KeyValuePair<string, object>>.Remove(KeyValuePair<string, object> value) => AdditionalPropertie |
| | 98 | | /// <inheritdoc /> |
| 0 | 99 | | bool ICollection<KeyValuePair<string, object>>.Contains(KeyValuePair<string, object> value) => AdditionalPropert |
| | 100 | | /// <inheritdoc /> |
| 0 | 101 | | void ICollection<KeyValuePair<string, object>>.CopyTo(KeyValuePair<string, object>[] destination, int offset) => |
| | 102 | | /// <inheritdoc /> |
| 0 | 103 | | void ICollection<KeyValuePair<string, object>>.Clear() => AdditionalProperties.Clear(); |
| | 104 | | /// <inheritdoc /> |
| | 105 | | public object this[string key] |
| | 106 | | { |
| 0 | 107 | | get => AdditionalProperties[key]; |
| 0 | 108 | | set => AdditionalProperties[key] = value; |
| | 109 | | } |
| | 110 | | } |
| | 111 | | } |