| | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 2 | | // Licensed under the MIT License. |
| | 3 | |
|
| | 4 | | namespace Azure.AI.TextAnalytics |
| | 5 | | { |
| | 6 | | /// <summary> |
| | 7 | | /// Text Analytics Error. |
| | 8 | | /// </summary> |
| | 9 | | public struct TextAnalyticsError |
| | 10 | | { |
| | 11 | | internal TextAnalyticsError(string code, string message, string target = null) |
| | 12 | | { |
| 52 | 13 | | ErrorCode = code; |
| 52 | 14 | | Message = message; |
| 52 | 15 | | Target = target; |
| 52 | 16 | | } |
| | 17 | |
|
| | 18 | | /// <summary> |
| | 19 | | /// Error code that serves as an indicator of the HTTP error code. |
| | 20 | | /// </summary> |
| 588 | 21 | | public TextAnalyticsErrorCode ErrorCode { get; } |
| | 22 | |
|
| | 23 | | /// <summary> |
| | 24 | | /// Message that contains more information about the reason of the error. |
| | 25 | | /// </summary> |
| 44 | 26 | | public string Message { get; } |
| | 27 | |
|
| | 28 | | /// <summary> |
| | 29 | | /// Target of the particular error (e.g. the name of |
| | 30 | | /// the property in error). |
| | 31 | | /// </summary> |
| 4 | 32 | | public string Target { get; } |
| | 33 | | } |
| | 34 | | } |