< Summary

Class:Microsoft.Azure.ApplicationInsights.Query.Models.Table
Assembly:Microsoft.Azure.ApplicationInsights.Query
File(s):C:\Git\azure-sdk-for-net\sdk\applicationinsights\Microsoft.Azure.ApplicationInsights.Query\src\Generated\Models\Table.cs
Covered lines:0
Uncovered lines:17
Coverable lines:17
Total lines:94
Line coverage:0% (0 of 17)
Covered branches:0
Total branches:6
Branch coverage:0% (0 of 6)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Name()-0%100%
get_Columns()-0%100%
get_Rows()-0%100%
Validate()-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\applicationinsights\Microsoft.Azure.ApplicationInsights.Query\src\Generated\Models\Table.cs

#LineLine coverage
 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
 11namespace 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>
 030        public Table()
 31        {
 32            CustomInit();
 033        }
 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>
 041        public Table(string name, IList<Column> columns, IList<IList<object>> rows)
 42        {
 043            Name = name;
 044            Columns = columns;
 045            Rows = rows;
 46            CustomInit();
 047        }
 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")]
 058        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")]
 064        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")]
 070        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        {
 080            if (Name == null)
 81            {
 082                throw new ValidationException(ValidationRules.CannotBeNull, "Name");
 83            }
 084            if (Columns == null)
 85            {
 086                throw new ValidationException(ValidationRules.CannotBeNull, "Columns");
 87            }
 088            if (Rows == null)
 89            {
 090                throw new ValidationException(ValidationRules.CannotBeNull, "Rows");
 91            }
 092        }
 93    }
 94}