< Summary

Class:Microsoft.Azure.OperationalInsights.Models.Table
Assembly:Microsoft.Azure.OperationalInsights
File(s):C:\Git\azure-sdk-for-net\sdk\operationalinsights\Microsoft.Azure.OperationalInsights\src\Generated\Models\Table.cs
Covered lines:5
Uncovered lines:12
Coverable lines:17
Total lines:90
Line coverage:29.4% (5 of 17)
Covered branches:0
Total branches:6
Branch coverage:0% (0 of 6)

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\operationalinsights\Microsoft.Azure.OperationalInsights\src\Generated\Models\Table.cs

#LineLine coverage
 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
 7namespace 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>
 426        public Table()
 27        {
 28            CustomInit();
 429        }
 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>
 037        public Table(string name, IList<Column> columns, IList<IList<string>> rows)
 38        {
 039            Name = name;
 040            Columns = columns;
 041            Rows = rows;
 42            CustomInit();
 043        }
 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")]
 854        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")]
 1260        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")]
 1666        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        {
 076            if (Name == null)
 77            {
 078                throw new ValidationException(ValidationRules.CannotBeNull, "Name");
 79            }
 080            if (Columns == null)
 81            {
 082                throw new ValidationException(ValidationRules.CannotBeNull, "Columns");
 83            }
 084            if (Rows == null)
 85            {
 086                throw new ValidationException(ValidationRules.CannotBeNull, "Rows");
 87            }
 088        }
 89    }
 90}