Beispiel #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ObservationQuery" /> class.
        /// </summary>


        /// <param name="Filter">Filter to return a subset of observations. Expresses boolean logical predicates as well as dimensional filters (required).</param>



        /// <param name="Metrics">Behaves like a SQL SELECT clause. Enables retrieving only named metrics. If omitted, all metrics that are available will be returned (like SELECT *)..</param>


        public ObservationQuery(AnalyticsQueryFilter Filter = null, List <MetricsEnum> Metrics = null)
        {
            // to ensure "Filter" is required (not null)
            if (Filter == null)
            {
                throw new InvalidDataException("Filter is a required property for ObservationQuery and cannot be null");
            }
            else
            {
                this.Filter = Filter;
            }



            this.Metrics = Metrics;
        }
Beispiel #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="AggregationQuery" /> class.
        /// </summary>


        /// <param name="Interval">Behaves like one clause in a SQL WHERE. Specifies the date and time range of data being queried. Intervals are represented as an ISO-8601 string. For example: YYYY-MM-DDThh:mm:ss/YYYY-MM-DDThh:mm:ss.</param>



        /// <param name="Granularity">Granularity aggregates metrics into subpartitions within the time interval specified. The default granularity is the same duration as the interval. Periods are represented as an ISO-8601 string. For example: P1D or P1DT12H.</param>



        /// <param name="TimeZone">Sets the time zone for the query interval, defaults to UTC. Time zones are represented as a string of the zone name as found in the IANA time zone database. For example: UTC, Etc/UTC, or Europe/London.</param>



        /// <param name="GroupBy">Behaves like a SQL GROUPBY. Allows for multiple levels of grouping as a list of dimensions. Partitions resulting aggregate computations into distinct named subgroups rather than across the entire result set as if it were one group..</param>



        /// <param name="Filter">Behaves like a SQL WHERE clause. This is ANDed with the interval parameter. Expresses boolean logical predicates as well as dimensional filters.</param>



        /// <param name="Metrics">Behaves like a SQL SELECT clause. Enables retrieving only named metrics. If omitted, all metrics that are available will be returned (like SELECT *)..</param>



        /// <param name="FlattenMultivaluedDimensions">Flattens any multivalued dimensions used in response groups (e.g. [&#39;a&#39;,&#39;b&#39;,&#39;c&#39;]-&gt;&#39;a,b,c&#39;).</param>



        /// <param name="Views">Custom derived metric views.</param>


        public AggregationQuery(string Interval = null, string Granularity = null, string TimeZone = null, List <GroupByEnum> GroupBy = null, AnalyticsQueryFilter Filter = null, List <MetricsEnum> Metrics = null, bool?FlattenMultivaluedDimensions = null, List <AnalyticsView> Views = null)
        {
            this.Interval = Interval;



            this.Granularity = Granularity;



            this.TimeZone = TimeZone;



            this.GroupBy = GroupBy;



            this.Filter = Filter;



            this.Metrics = Metrics;



            this.FlattenMultivaluedDimensions = FlattenMultivaluedDimensions;



            this.Views = Views;
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="ObservationQuery" /> class.
 /// </summary>
 /// <param name="Filter">Filter to return a subset of observations. Expresses boolean logical predicates as well as dimensional filters (required).</param>
 /// <param name="Metrics">Behaves like a SQL SELECT clause. Enables retrieving only named metrics. If omitted, all metrics that are available will be returned (like SELECT *)..</param>
 /// <param name="DetailMetrics">Metrics for which to include additional detailed observations.</param>
 public ObservationQuery(AnalyticsQueryFilter Filter = null, List <MetricsEnum> Metrics = null, List <DetailMetricsEnum> DetailMetrics = null)
 {
     this.Filter        = Filter;
     this.Metrics       = Metrics;
     this.DetailMetrics = DetailMetrics;
 }