| | 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 Azure.Core; |
| | 12 | |
|
| | 13 | | namespace Azure.Analytics.Synapse.Artifacts.Models |
| | 14 | | { |
| | 15 | | /// <summary> The content of the SQL script. </summary> |
| | 16 | | public partial class SqlScriptContent : IDictionary<string, object> |
| | 17 | | { |
| | 18 | | /// <summary> Initializes a new instance of SqlScriptContent. </summary> |
| | 19 | | /// <param name="query"> SQL query to execute. </param> |
| | 20 | | /// <param name="currentConnection"> The connection used to execute the SQL script. </param> |
| | 21 | | /// <exception cref="ArgumentNullException"> <paramref name="query"/> or <paramref name="currentConnection"/> is |
| 0 | 22 | | public SqlScriptContent(string query, SqlConnection currentConnection) |
| | 23 | | { |
| 0 | 24 | | if (query == null) |
| | 25 | | { |
| 0 | 26 | | throw new ArgumentNullException(nameof(query)); |
| | 27 | | } |
| 0 | 28 | | if (currentConnection == null) |
| | 29 | | { |
| 0 | 30 | | throw new ArgumentNullException(nameof(currentConnection)); |
| | 31 | | } |
| | 32 | |
|
| 0 | 33 | | Query = query; |
| 0 | 34 | | CurrentConnection = currentConnection; |
| 0 | 35 | | AdditionalProperties = new ChangeTrackingDictionary<string, object>(); |
| 0 | 36 | | } |
| | 37 | |
|
| | 38 | | /// <summary> Initializes a new instance of SqlScriptContent. </summary> |
| | 39 | | /// <param name="query"> SQL query to execute. </param> |
| | 40 | | /// <param name="currentConnection"> The connection used to execute the SQL script. </param> |
| | 41 | | /// <param name="metadata"> The metadata of the SQL script. </param> |
| | 42 | | /// <param name="additionalProperties"> . </param> |
| 0 | 43 | | internal SqlScriptContent(string query, SqlConnection currentConnection, SqlScriptMetadata metadata, IDictionary |
| | 44 | | { |
| 0 | 45 | | Query = query; |
| 0 | 46 | | CurrentConnection = currentConnection; |
| 0 | 47 | | Metadata = metadata; |
| 0 | 48 | | AdditionalProperties = additionalProperties; |
| 0 | 49 | | } |
| | 50 | |
|
| | 51 | | /// <summary> SQL query to execute. </summary> |
| 0 | 52 | | public string Query { get; set; } |
| | 53 | | /// <summary> The connection used to execute the SQL script. </summary> |
| 0 | 54 | | public SqlConnection CurrentConnection { get; set; } |
| | 55 | | /// <summary> The metadata of the SQL script. </summary> |
| 0 | 56 | | public SqlScriptMetadata Metadata { get; set; } |
| 0 | 57 | | internal IDictionary<string, object> AdditionalProperties { get; } |
| | 58 | | /// <inheritdoc /> |
| 0 | 59 | | public IEnumerator<KeyValuePair<string, object>> GetEnumerator() => AdditionalProperties.GetEnumerator(); |
| | 60 | | /// <inheritdoc /> |
| 0 | 61 | | IEnumerator IEnumerable.GetEnumerator() => AdditionalProperties.GetEnumerator(); |
| | 62 | | /// <inheritdoc /> |
| 0 | 63 | | public bool TryGetValue(string key, out object value) => AdditionalProperties.TryGetValue(key, out value); |
| | 64 | | /// <inheritdoc /> |
| 0 | 65 | | public bool ContainsKey(string key) => AdditionalProperties.ContainsKey(key); |
| | 66 | | /// <inheritdoc /> |
| 0 | 67 | | public ICollection<string> Keys => AdditionalProperties.Keys; |
| | 68 | | /// <inheritdoc /> |
| 0 | 69 | | public ICollection<object> Values => AdditionalProperties.Values; |
| | 70 | | /// <inheritdoc /> |
| 0 | 71 | | int ICollection<KeyValuePair<string, object>>.Count => AdditionalProperties.Count; |
| | 72 | | /// <inheritdoc /> |
| 0 | 73 | | public void Add(string key, object value) => AdditionalProperties.Add(key, value); |
| | 74 | | /// <inheritdoc /> |
| 0 | 75 | | public bool Remove(string key) => AdditionalProperties.Remove(key); |
| | 76 | | /// <inheritdoc /> |
| 0 | 77 | | bool ICollection<KeyValuePair<string, object>>.IsReadOnly => AdditionalProperties.IsReadOnly; |
| | 78 | | /// <inheritdoc /> |
| 0 | 79 | | void ICollection<KeyValuePair<string, object>>.Add(KeyValuePair<string, object> value) => AdditionalProperties.A |
| | 80 | | /// <inheritdoc /> |
| 0 | 81 | | bool ICollection<KeyValuePair<string, object>>.Remove(KeyValuePair<string, object> value) => AdditionalPropertie |
| | 82 | | /// <inheritdoc /> |
| 0 | 83 | | bool ICollection<KeyValuePair<string, object>>.Contains(KeyValuePair<string, object> value) => AdditionalPropert |
| | 84 | | /// <inheritdoc /> |
| 0 | 85 | | void ICollection<KeyValuePair<string, object>>.CopyTo(KeyValuePair<string, object>[] destination, int offset) => |
| | 86 | | /// <inheritdoc /> |
| 0 | 87 | | void ICollection<KeyValuePair<string, object>>.Clear() => AdditionalProperties.Clear(); |
| | 88 | | /// <inheritdoc /> |
| | 89 | | public object this[string key] |
| | 90 | | { |
| 0 | 91 | | get => AdditionalProperties[key]; |
| 0 | 92 | | set => AdditionalProperties[key] = value; |
| | 93 | | } |
| | 94 | | } |
| | 95 | | } |