| | 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.Generic; |
| | 10 | | using Azure.Core; |
| | 11 | |
|
| | 12 | | namespace Azure.Analytics.Synapse.Artifacts.Models |
| | 13 | | { |
| | 14 | | /// <summary> The object that defines the structure of an Azure Synapse error response. </summary> |
| | 15 | | internal partial class CloudError |
| | 16 | | { |
| | 17 | | /// <summary> Initializes a new instance of CloudError. </summary> |
| | 18 | | /// <param name="code"> Error code. </param> |
| | 19 | | /// <param name="message"> Error message. </param> |
| | 20 | | /// <exception cref="ArgumentNullException"> <paramref name="code"/> or <paramref name="message"/> is null. </ex |
| 0 | 21 | | internal CloudError(string code, string message) |
| | 22 | | { |
| 0 | 23 | | if (code == null) |
| | 24 | | { |
| 0 | 25 | | throw new ArgumentNullException(nameof(code)); |
| | 26 | | } |
| 0 | 27 | | if (message == null) |
| | 28 | | { |
| 0 | 29 | | throw new ArgumentNullException(nameof(message)); |
| | 30 | | } |
| | 31 | |
|
| 0 | 32 | | Code = code; |
| 0 | 33 | | Message = message; |
| 0 | 34 | | Details = new ChangeTrackingList<CloudError>(); |
| 0 | 35 | | } |
| | 36 | |
|
| | 37 | | /// <summary> Initializes a new instance of CloudError. </summary> |
| | 38 | | /// <param name="code"> Error code. </param> |
| | 39 | | /// <param name="message"> Error message. </param> |
| | 40 | | /// <param name="target"> Property name/path in request associated with error. </param> |
| | 41 | | /// <param name="details"> Array with additional error details. </param> |
| 0 | 42 | | internal CloudError(string code, string message, string target, IReadOnlyList<CloudError> details) |
| | 43 | | { |
| 0 | 44 | | Code = code; |
| 0 | 45 | | Message = message; |
| 0 | 46 | | Target = target; |
| 0 | 47 | | Details = details; |
| 0 | 48 | | } |
| | 49 | |
|
| | 50 | | /// <summary> Error code. </summary> |
| 0 | 51 | | public string Code { get; } |
| | 52 | | /// <summary> Error message. </summary> |
| 0 | 53 | | public string Message { get; } |
| | 54 | | /// <summary> Property name/path in request associated with error. </summary> |
| 0 | 55 | | public string Target { get; } |
| | 56 | | /// <summary> Array with additional error details. </summary> |
| 0 | 57 | | public IReadOnlyList<CloudError> Details { get; } |
| | 58 | | } |
| | 59 | | } |