| | 1 | | // <auto-generated> |
| | 2 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 3 | | // Licensed under the MIT License. See License.txt in the project root for |
| | 4 | | // license information. |
| | 5 | | // |
| | 6 | | // Code generated by Microsoft (R) AutoRest Code Generator. |
| | 7 | | // Changes may cause incorrect behavior and will be lost if the code is |
| | 8 | | // regenerated. |
| | 9 | | // </auto-generated> |
| | 10 | |
|
| | 11 | | namespace Microsoft.Azure.ApplicationInsights.Query.Models |
| | 12 | | { |
| | 13 | | using Microsoft.Rest; |
| | 14 | | using Newtonsoft.Json; |
| | 15 | | using System.Collections; |
| | 16 | | using System.Collections.Generic; |
| | 17 | | using System.Linq; |
| | 18 | |
|
| | 19 | | /// <summary> |
| | 20 | | /// A query response table. |
| | 21 | | /// </summary> |
| | 22 | | /// <remarks> |
| | 23 | | /// Contains the columns and rows for one table in a query response. |
| | 24 | | /// </remarks> |
| | 25 | | public partial class Table |
| | 26 | | { |
| | 27 | | /// <summary> |
| | 28 | | /// Initializes a new instance of the Table class. |
| | 29 | | /// </summary> |
| 0 | 30 | | public Table() |
| | 31 | | { |
| | 32 | | CustomInit(); |
| 0 | 33 | | } |
| | 34 | |
|
| | 35 | | /// <summary> |
| | 36 | | /// Initializes a new instance of the Table class. |
| | 37 | | /// </summary> |
| | 38 | | /// <param name="name">The name of the table.</param> |
| | 39 | | /// <param name="columns">The list of columns in this table.</param> |
| | 40 | | /// <param name="rows">The resulting rows from this query.</param> |
| 0 | 41 | | public Table(string name, IList<Column> columns, IList<IList<object>> rows) |
| | 42 | | { |
| 0 | 43 | | Name = name; |
| 0 | 44 | | Columns = columns; |
| 0 | 45 | | Rows = rows; |
| | 46 | | CustomInit(); |
| 0 | 47 | | } |
| | 48 | |
|
| | 49 | | /// <summary> |
| | 50 | | /// An initialization method that performs custom operations like setting defaults |
| | 51 | | /// </summary> |
| | 52 | | partial void CustomInit(); |
| | 53 | |
|
| | 54 | | /// <summary> |
| | 55 | | /// Gets or sets the name of the table. |
| | 56 | | /// </summary> |
| | 57 | | [JsonProperty(PropertyName = "name")] |
| 0 | 58 | | public string Name { get; set; } |
| | 59 | |
|
| | 60 | | /// <summary> |
| | 61 | | /// Gets or sets the list of columns in this table. |
| | 62 | | /// </summary> |
| | 63 | | [JsonProperty(PropertyName = "columns")] |
| 0 | 64 | | public IList<Column> Columns { get; set; } |
| | 65 | |
|
| | 66 | | /// <summary> |
| | 67 | | /// Gets or sets the resulting rows from this query. |
| | 68 | | /// </summary> |
| | 69 | | [JsonProperty(PropertyName = "rows")] |
| 0 | 70 | | public IList<IList<object>> Rows { get; set; } |
| | 71 | |
|
| | 72 | | /// <summary> |
| | 73 | | /// Validate the object. |
| | 74 | | /// </summary> |
| | 75 | | /// <exception cref="ValidationException"> |
| | 76 | | /// Thrown if validation fails |
| | 77 | | /// </exception> |
| | 78 | | public virtual void Validate() |
| | 79 | | { |
| 0 | 80 | | if (Name == null) |
| | 81 | | { |
| 0 | 82 | | throw new ValidationException(ValidationRules.CannotBeNull, "Name"); |
| | 83 | | } |
| 0 | 84 | | if (Columns == null) |
| | 85 | | { |
| 0 | 86 | | throw new ValidationException(ValidationRules.CannotBeNull, "Columns"); |
| | 87 | | } |
| 0 | 88 | | if (Rows == null) |
| | 89 | | { |
| 0 | 90 | | throw new ValidationException(ValidationRules.CannotBeNull, "Rows"); |
| | 91 | | } |
| 0 | 92 | | } |
| | 93 | | } |
| | 94 | | } |