| | 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. </summary> |
| | 17 | | public partial class Notebook : IDictionary<string, object> |
| | 18 | | { |
| | 19 | | /// <summary> Initializes a new instance of Notebook. </summary> |
| | 20 | | /// <param name="metadata"> Notebook root-level metadata. </param> |
| | 21 | | /// <param name="nbformat"> Notebook format (major number). Incremented between backwards incompatible changes t |
| | 22 | | /// <param name="nbformatMinor"> Notebook format (minor number). Incremented for backward compatible changes to |
| | 23 | | /// <param name="cells"> Array of cells of the current notebook. </param> |
| | 24 | | /// <exception cref="ArgumentNullException"> <paramref name="metadata"/> or <paramref name="cells"/> is null. </ |
| 0 | 25 | | public Notebook(NotebookMetadata metadata, int nbformat, int nbformatMinor, IEnumerable<NotebookCell> cells) |
| | 26 | | { |
| 0 | 27 | | if (metadata == null) |
| | 28 | | { |
| 0 | 29 | | throw new ArgumentNullException(nameof(metadata)); |
| | 30 | | } |
| 0 | 31 | | if (cells == null) |
| | 32 | | { |
| 0 | 33 | | throw new ArgumentNullException(nameof(cells)); |
| | 34 | | } |
| | 35 | |
|
| 0 | 36 | | Metadata = metadata; |
| 0 | 37 | | Nbformat = nbformat; |
| 0 | 38 | | NbformatMinor = nbformatMinor; |
| 0 | 39 | | Cells = cells.ToList(); |
| 0 | 40 | | AdditionalProperties = new ChangeTrackingDictionary<string, object>(); |
| 0 | 41 | | } |
| | 42 | |
|
| | 43 | | /// <summary> Initializes a new instance of Notebook. </summary> |
| | 44 | | /// <param name="description"> The description of the notebook. </param> |
| | 45 | | /// <param name="bigDataPool"> Big data pool reference. </param> |
| | 46 | | /// <param name="sessionProperties"> Session properties. </param> |
| | 47 | | /// <param name="metadata"> Notebook root-level metadata. </param> |
| | 48 | | /// <param name="nbformat"> Notebook format (major number). Incremented between backwards incompatible changes t |
| | 49 | | /// <param name="nbformatMinor"> Notebook format (minor number). Incremented for backward compatible changes to |
| | 50 | | /// <param name="cells"> Array of cells of the current notebook. </param> |
| | 51 | | /// <param name="additionalProperties"> . </param> |
| 24 | 52 | | internal Notebook(string description, BigDataPoolReference bigDataPool, NotebookSessionProperties sessionPropert |
| | 53 | | { |
| 24 | 54 | | Description = description; |
| 24 | 55 | | BigDataPool = bigDataPool; |
| 24 | 56 | | SessionProperties = sessionProperties; |
| 24 | 57 | | Metadata = metadata; |
| 24 | 58 | | Nbformat = nbformat; |
| 24 | 59 | | NbformatMinor = nbformatMinor; |
| 24 | 60 | | Cells = cells; |
| 24 | 61 | | AdditionalProperties = additionalProperties; |
| 24 | 62 | | } |
| | 63 | |
|
| | 64 | | /// <summary> The description of the notebook. </summary> |
| 0 | 65 | | public string Description { get; set; } |
| | 66 | | /// <summary> Big data pool reference. </summary> |
| 48 | 67 | | public BigDataPoolReference BigDataPool { get; set; } |
| | 68 | | /// <summary> Session properties. </summary> |
| 0 | 69 | | public NotebookSessionProperties SessionProperties { get; set; } |
| | 70 | | /// <summary> Notebook root-level metadata. </summary> |
| 0 | 71 | | public NotebookMetadata Metadata { get; set; } |
| | 72 | | /// <summary> Notebook format (major number). Incremented between backwards incompatible changes to the notebook |
| 0 | 73 | | public int Nbformat { get; set; } |
| | 74 | | /// <summary> Notebook format (minor number). Incremented for backward compatible changes to the notebook format |
| 0 | 75 | | public int NbformatMinor { get; set; } |
| | 76 | | /// <summary> Array of cells of the current notebook. </summary> |
| 0 | 77 | | public IList<NotebookCell> Cells { get; } |
| 0 | 78 | | internal IDictionary<string, object> AdditionalProperties { get; } |
| | 79 | | /// <inheritdoc /> |
| 0 | 80 | | public IEnumerator<KeyValuePair<string, object>> GetEnumerator() => AdditionalProperties.GetEnumerator(); |
| | 81 | | /// <inheritdoc /> |
| 0 | 82 | | IEnumerator IEnumerable.GetEnumerator() => AdditionalProperties.GetEnumerator(); |
| | 83 | | /// <inheritdoc /> |
| 0 | 84 | | public bool TryGetValue(string key, out object value) => AdditionalProperties.TryGetValue(key, out value); |
| | 85 | | /// <inheritdoc /> |
| 0 | 86 | | public bool ContainsKey(string key) => AdditionalProperties.ContainsKey(key); |
| | 87 | | /// <inheritdoc /> |
| 0 | 88 | | public ICollection<string> Keys => AdditionalProperties.Keys; |
| | 89 | | /// <inheritdoc /> |
| 0 | 90 | | public ICollection<object> Values => AdditionalProperties.Values; |
| | 91 | | /// <inheritdoc /> |
| 0 | 92 | | int ICollection<KeyValuePair<string, object>>.Count => AdditionalProperties.Count; |
| | 93 | | /// <inheritdoc /> |
| 0 | 94 | | public void Add(string key, object value) => AdditionalProperties.Add(key, value); |
| | 95 | | /// <inheritdoc /> |
| 0 | 96 | | public bool Remove(string key) => AdditionalProperties.Remove(key); |
| | 97 | | /// <inheritdoc /> |
| 0 | 98 | | bool ICollection<KeyValuePair<string, object>>.IsReadOnly => AdditionalProperties.IsReadOnly; |
| | 99 | | /// <inheritdoc /> |
| 0 | 100 | | void ICollection<KeyValuePair<string, object>>.Add(KeyValuePair<string, object> value) => AdditionalProperties.A |
| | 101 | | /// <inheritdoc /> |
| 0 | 102 | | bool ICollection<KeyValuePair<string, object>>.Remove(KeyValuePair<string, object> value) => AdditionalPropertie |
| | 103 | | /// <inheritdoc /> |
| 0 | 104 | | bool ICollection<KeyValuePair<string, object>>.Contains(KeyValuePair<string, object> value) => AdditionalPropert |
| | 105 | | /// <inheritdoc /> |
| 0 | 106 | | void ICollection<KeyValuePair<string, object>>.CopyTo(KeyValuePair<string, object>[] destination, int offset) => |
| | 107 | | /// <inheritdoc /> |
| 0 | 108 | | void ICollection<KeyValuePair<string, object>>.Clear() => AdditionalProperties.Clear(); |
| | 109 | | /// <inheritdoc /> |
| | 110 | | public object this[string key] |
| | 111 | | { |
| 0 | 112 | | get => AdditionalProperties[key]; |
| 0 | 113 | | set => AdditionalProperties[key] = value; |
| | 114 | | } |
| | 115 | | } |
| | 116 | | } |