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