| | 1 | | /* |
| | 2 | | * WeShare API |
| | 3 | | * |
| | 4 | | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) |
| | 5 | | * |
| | 6 | | * The version of the OpenAPI document: 1.0 |
| | 7 | | * Generated by: https://github.com/openapitools/openapi-generator.git |
| | 8 | | */ |
| | 9 | |
|
| | 10 | |
|
| | 11 | | using System; |
| | 12 | |
|
| | 13 | | namespace Applications.WeShare.Swagger.Client |
| | 14 | | { |
| | 15 | | /// <summary> |
| | 16 | | /// API Exception |
| | 17 | | /// </summary> |
| | 18 | | public class ApiException : Exception |
| | 19 | | { |
| | 20 | | /// <summary> |
| | 21 | | /// Gets or sets the error code (HTTP status code) |
| | 22 | | /// </summary> |
| | 23 | | /// <value>The error code (HTTP status code).</value> |
| 62 | 24 | | public int ErrorCode { get; set; } |
| | 25 | |
|
| | 26 | | /// <summary> |
| | 27 | | /// Gets or sets the error content (body json object) |
| | 28 | | /// </summary> |
| | 29 | | /// <value>The error content (Http response body).</value> |
| 21 | 30 | | public object ErrorContent { get; private set; } |
| | 31 | |
|
| | 32 | | /// <summary> |
| | 33 | | /// Gets or sets the HTTP headers |
| | 34 | | /// </summary> |
| | 35 | | /// <value>HTTP headers</value> |
| 21 | 36 | | public Multimap<string, string> Headers { get; private set; } |
| | 37 | |
|
| | 38 | | /// <summary> |
| | 39 | | /// Initializes a new instance of the <see cref="ApiException"/> class. |
| | 40 | | /// </summary> |
| 0 | 41 | | public ApiException() { } |
| | 42 | |
|
| | 43 | | /// <summary> |
| | 44 | | /// Initializes a new instance of the <see cref="ApiException"/> class. |
| | 45 | | /// </summary> |
| | 46 | | /// <param name="errorCode">HTTP status code.</param> |
| | 47 | | /// <param name="message">Error message.</param> |
| 20 | 48 | | public ApiException(int errorCode, string message) : base(message) |
| 20 | 49 | | { |
| 20 | 50 | | this.ErrorCode = errorCode; |
| 20 | 51 | | } |
| | 52 | |
|
| | 53 | | /// <summary> |
| | 54 | | /// Initializes a new instance of the <see cref="ApiException"/> class. |
| | 55 | | /// </summary> |
| | 56 | | /// <param name="errorCode">HTTP status code.</param> |
| | 57 | | /// <param name="message">Error message.</param> |
| | 58 | | /// <param name="errorContent">Error content.</param> |
| | 59 | | /// <param name="headers">HTTP Headers.</param> |
| 21 | 60 | | public ApiException(int errorCode, string message, object errorContent = null, Multimap<string, string> headers |
| 21 | 61 | | { |
| 21 | 62 | | this.ErrorCode = errorCode; |
| 21 | 63 | | this.ErrorContent = errorContent; |
| 21 | 64 | | this.Headers = headers; |
| 21 | 65 | | } |
| | 66 | | } |
| | 67 | |
|
| | 68 | | } |