< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_MetricId()-0%100%
get_Timespan()-0%100%
get_Aggregation()-0%100%
get_Interval()-0%100%
get_Segment()-0%100%
get_Top()-0%100%
get_Orderby()-0%100%
get_Filter()-0%100%
Validate()-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\applicationinsights\Microsoft.Azure.ApplicationInsights.Query\src\Generated\Models\MetricsPostBodySchemaParameters.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    /// The parameters for a single metrics query
 21    /// </summary>
 22    public partial class MetricsPostBodySchemaParameters
 23    {
 24        /// <summary>
 25        /// Initializes a new instance of the MetricsPostBodySchemaParameters
 26        /// class.
 27        /// </summary>
 028        public MetricsPostBodySchemaParameters()
 29        {
 30            CustomInit();
 031        }
 32
 33        /// <summary>
 34        /// Initializes a new instance of the MetricsPostBodySchemaParameters
 35        /// class.
 36        /// </summary>
 37        /// <param name="metricId">Possible values include: 'requests/count',
 38        /// 'requests/duration', 'requests/failed', 'users/count',
 39        /// 'users/authenticated', 'pageViews/count', 'pageViews/duration',
 40        /// 'client/processingDuration', 'client/receiveDuration',
 41        /// 'client/networkDuration', 'client/sendDuration',
 42        /// 'client/totalDuration', 'dependencies/count',
 43        /// 'dependencies/failed', 'dependencies/duration', 'exceptions/count',
 44        /// 'exceptions/browser', 'exceptions/server', 'sessions/count',
 45        /// 'performanceCounters/requestExecutionTime',
 46        /// 'performanceCounters/requestsPerSecond',
 47        /// 'performanceCounters/requestsInQueue',
 48        /// 'performanceCounters/memoryAvailableBytes',
 49        /// 'performanceCounters/exceptionsPerSecond',
 50        /// 'performanceCounters/processCpuPercentage',
 51        /// 'performanceCounters/processIOBytesPerSecond',
 52        /// 'performanceCounters/processPrivateBytes',
 53        /// 'performanceCounters/processorCpuPercentage',
 54        /// 'availabilityResults/availabilityPercentage',
 55        /// 'availabilityResults/duration', 'billing/telemetryCount',
 56        /// 'customEvents/count'</param>
 057        public MetricsPostBodySchemaParameters(string metricId, string timespan = default(string), IList<string> aggrega
 58        {
 059            MetricId = metricId;
 060            Timespan = timespan;
 061            Aggregation = aggregation;
 062            Interval = interval;
 063            Segment = segment;
 064            Top = top;
 065            Orderby = orderby;
 066            Filter = filter;
 67            CustomInit();
 068        }
 69
 70        /// <summary>
 71        /// An initialization method that performs custom operations like setting defaults
 72        /// </summary>
 73        partial void CustomInit();
 74
 75        /// <summary>
 76        /// Gets or sets possible values include: 'requests/count',
 77        /// 'requests/duration', 'requests/failed', 'users/count',
 78        /// 'users/authenticated', 'pageViews/count', 'pageViews/duration',
 79        /// 'client/processingDuration', 'client/receiveDuration',
 80        /// 'client/networkDuration', 'client/sendDuration',
 81        /// 'client/totalDuration', 'dependencies/count',
 82        /// 'dependencies/failed', 'dependencies/duration', 'exceptions/count',
 83        /// 'exceptions/browser', 'exceptions/server', 'sessions/count',
 84        /// 'performanceCounters/requestExecutionTime',
 85        /// 'performanceCounters/requestsPerSecond',
 86        /// 'performanceCounters/requestsInQueue',
 87        /// 'performanceCounters/memoryAvailableBytes',
 88        /// 'performanceCounters/exceptionsPerSecond',
 89        /// 'performanceCounters/processCpuPercentage',
 90        /// 'performanceCounters/processIOBytesPerSecond',
 91        /// 'performanceCounters/processPrivateBytes',
 92        /// 'performanceCounters/processorCpuPercentage',
 93        /// 'availabilityResults/availabilityPercentage',
 94        /// 'availabilityResults/duration', 'billing/telemetryCount',
 95        /// 'customEvents/count'
 96        /// </summary>
 97        [JsonProperty(PropertyName = "metricId")]
 098        public string MetricId { get; set; }
 99
 100        /// <summary>
 101        /// </summary>
 102        [JsonProperty(PropertyName = "timespan")]
 0103        public string Timespan { get; set; }
 104
 105        /// <summary>
 106        /// </summary>
 107        [JsonProperty(PropertyName = "aggregation")]
 0108        public IList<string> Aggregation { get; set; }
 109
 110        /// <summary>
 111        /// </summary>
 112        [JsonProperty(PropertyName = "interval")]
 0113        public System.TimeSpan? Interval { get; set; }
 114
 115        /// <summary>
 116        /// </summary>
 117        [JsonProperty(PropertyName = "segment")]
 0118        public IList<string> Segment { get; set; }
 119
 120        /// <summary>
 121        /// </summary>
 122        [JsonProperty(PropertyName = "top")]
 0123        public int? Top { get; set; }
 124
 125        /// <summary>
 126        /// </summary>
 127        [JsonProperty(PropertyName = "orderby")]
 0128        public string Orderby { get; set; }
 129
 130        /// <summary>
 131        /// </summary>
 132        [JsonProperty(PropertyName = "filter")]
 0133        public string Filter { get; set; }
 134
 135        /// <summary>
 136        /// Validate the object.
 137        /// </summary>
 138        /// <exception cref="ValidationException">
 139        /// Thrown if validation fails
 140        /// </exception>
 141        public virtual void Validate()
 142        {
 0143            if (MetricId == null)
 144            {
 0145                throw new ValidationException(ValidationRules.CannotBeNull, "MetricId");
 146            }
 0147        }
 148    }
 149}