Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the NumericVariable class.
 /// </summary>
 /// <param name="value">Value time series expression is used to
 /// represent the value of the signal that is going to be aggregated or
 /// interpolated. For example, temperature values from the event is
 /// represented like this: "$event.Temperature.Double".</param>
 /// <param name="aggregation">Aggregation time series expression when
 /// kind is "numeric" is used to represent the aggregation that needs
 /// to be performed on the $value expression. This requires $value to
 /// be specified and can only use $value inside the aggregate
 /// functions. For example, aggregation for calculating minimum of the
 /// $value is written as: "min($value)".</param>
 /// <param name="filter">Filter over the events that restricts the
 /// number of events being considered for computation. Example:
 /// "$event.Status.String='Good'". Optional.</param>
 public NumericVariable(Tsx value, Tsx aggregation, Tsx filter = default(Tsx))
     : base(filter)
 {
     Value       = value;
     Aggregation = aggregation;
     CustomInit();
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the GetEvents class.
 /// </summary>
 /// <param name="timeSeriesId">A single Time Series ID value that
 /// uniquely identifies a single time series instance (e.g. a device).
 /// Note that a single Time Series ID can be composite if multiple
 /// properties are specified as Time Series ID at environment creation
 /// time. The position and type of values must match Time Series ID
 /// properties specified on the environment and returned by Get Model
 /// Setting API. Cannot be null.</param>
 /// <param name="searchSpan">The range of time on which the query is
 /// executed. Cannot be null.</param>
 /// <param name="filter">Optional top-level filter for the query which
 /// will be applied to all the variables in the query. Example:
 /// "$event.Status.String='Good'".  Can be null.</param>
 /// <param name="projectedProperties">Projected properties is an array
 /// of property names which you want to project. These properties must
 /// appear in the events.</param>
 public GetEvents(IList <object> timeSeriesId, DateTimeRange searchSpan, Tsx filter = default(Tsx), IList <string> projectedProperties = default(IList <string>))
 {
     TimeSeriesId        = timeSeriesId;
     SearchSpan          = searchSpan;
     Filter              = filter;
     ProjectedProperties = projectedProperties;
     CustomInit();
 }
 /// <summary>
 /// Initializes a new instance of the NumericVariable class.
 /// </summary>
 /// <param name="value">Value time series expression is used to
 /// represent the value of the signal that is going to be aggregated or
 /// interpolated. For example, temperature values from the event is
 /// represented like this: "$event.Temperature.Double".</param>
 /// <param name="aggregation">Aggregation time series expression when
 /// kind is "numeric" is used to represent the aggregation that needs
 /// to be performed on the $value expression. This requires $value to
 /// be specified and can only use $value inside the aggregate
 /// functions. For example, aggregation for calculating minimum of the
 /// $value is written as: "min($value)".</param>
 /// <param name="filter">Filter over the events that restricts the
 /// number of events being considered for computation. Example:
 /// "$event.Status.String='Good'". Optional.</param>
 public NumericVariable(Tsx value, Tsx aggregation, Tsx filter = default(Tsx), Interpolation interpolation = default(Interpolation))
     : base(filter)
 {
     Value         = value;
     Interpolation = interpolation;
     Aggregation   = aggregation;
     CustomInit();
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the GetEvents class.
 /// </summary>
 /// <param name="timeSeriesId">A single Time Series ID value that
 /// uniquely identifies a single time series instance (e.g. a device).
 /// Note that a single Time Series ID can be composite if multiple
 /// properties are specified as Time Series ID at environment creation
 /// time. The position and type of values must match Time Series ID
 /// properties specified on the environment and returned by Get Model
 /// Setting API. Cannot be null.</param>
 /// <param name="searchSpan">The range of time on which the query is
 /// executed. Cannot be null.</param>
 /// <param name="filter">Optional top-level filter for the query which
 /// will be applied to all the variables in the query. Example:
 /// "$event.Status.String='Good'".  Can be null.</param>
 /// <param name="projectedProperties">Projected properties is an array
 /// of properties which you want to project. These properties must
 /// appear in the events; otherwise, they are not returned.</param>
 /// <param name="take">Maximum number of property values in the whole
 /// response set, not the maximum number of property values per page.
 /// Defaults to 10,000 when not set. Maximum value of take can be
 /// 250,000.</param>
 public GetEvents(IList <object> timeSeriesId, DateTimeRange searchSpan, Tsx filter = default(Tsx), IList <EventProperty> projectedProperties = default(IList <EventProperty>), int?take = default(int?))
 {
     TimeSeriesId        = timeSeriesId;
     SearchSpan          = searchSpan;
     Filter              = filter;
     ProjectedProperties = projectedProperties;
     Take = take;
     CustomInit();
 }
 /// <summary>
 /// Initializes a new instance of the CategoricalVariable class.
 /// </summary>
 /// <param name="value">Value time series expression is used to
 /// represent the value of the signal that is going to be categorized.
 /// It can evaluate to only 'String' or 'Long' type for categorical
 /// variables.</param>
 /// <param name="filter">Filter over the events that restricts the
 /// number of events being considered for computation. Example:
 /// "$event.Status.String='Good'". Optional.</param>
 /// <param name="interpolation">Categorical variable supports only
 /// 'step' interpolation.</param>
 public CategoricalVariable(Tsx value, TimeSeriesDefaultCategory defaultCategory, Tsx filter = default(Tsx), Interpolation interpolation = default(Interpolation), IList <TimeSeriesAggregateCategory> categories = default(IList <TimeSeriesAggregateCategory>))
     : base(filter)
 {
     Value           = value;
     Interpolation   = interpolation;
     Categories      = categories;
     DefaultCategory = defaultCategory;
     CustomInit();
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Initializes a new instance of the GetSeries class.
 /// </summary>
 /// <param name="timeSeriesId">A single Time Series ID value that
 /// uniquely identifies a single time series instance (e.g. a device).
 /// Note that a single Time Series ID can be composite if multiple
 /// properties are specified as Time Series ID at environment creation
 /// time. The position and type of values must match Time Series ID
 /// properties specified on the environment and returned by Get Model
 /// Setting API. Cannot be null.</param>
 /// <param name="searchSpan">The range of time on which the query is
 /// executed. Cannot be null.</param>
 /// <param name="filter">Top-level filter over the events that
 /// restricts the number of events being considered for computation.
 /// This filter is AND'ed with filter in each variable. Example:
 /// "$event.Status.String='Good'". Optional.</param>
 /// <param name="projectedVariables">Selected variables that needs to
 /// be projected in the query result. When it is null or not set, all
 /// the variables from inlineVariables and time series type in the
 /// model are returned. Can be null.</param>
 /// <param name="inlineVariables">Optional inline variables apart from
 /// the ones already defined in the time series type in the model. When
 /// the inline variable name is the same name as in the model, the
 /// inline variable definition takes precedence. Can be null.</param>
 public GetSeries(IList <object> timeSeriesId, DateTimeRange searchSpan, Tsx filter = default(Tsx), IList <string> projectedVariables = default(IList <string>), IDictionary <string, Variable> inlineVariables = default(IDictionary <string, Variable>))
 {
     TimeSeriesId       = timeSeriesId;
     SearchSpan         = searchSpan;
     Filter             = filter;
     ProjectedVariables = projectedVariables;
     InlineVariables    = inlineVariables;
     CustomInit();
 }
Ejemplo n.º 7
0
        /// <summary>
        /// Initializes a new instance of the NumericVariable class.
        /// </summary>
        /// <param name="value">Value time series expression is used to
        /// represent the value of the signal that is going to be aggregated or
        /// interpolated. For example, temperature values from the event is
        /// represented like this: "$event.Temperature.Double".</param>
        /// <param name="aggregation">Aggregation time series expression when
        /// kind is "numeric" is used to represent the aggregation that needs
        /// to be performed on the $value expression. This requires $value to
        /// be specified and can only use $value inside the aggregate
        /// functions. For example, aggregation for calculating minimum of the
        /// $value is written as: "min($value)".</param>
        /// <param name="filter">Filter over the events that restricts the
        /// number of events being considered for computation. Example:
        /// "$event.Status.String='Good'". Optional.</param>


        public NumericVariable(Tsx aggregation, Tsx value = default(Tsx), Tsx filter = default(Tsx))


        {
            Value       = value;
            Aggregation = aggregation;
            Filter      = filter;
            CustomInit();
        }
Ejemplo n.º 8
0
        public NumericVariable(Tsx aggregation, string kind, Tsx value = default(Tsx), Tsx filter = default(Tsx))

        {
            Kind = kind;
            string numeric   = "numeric";
            string aggregate = "aggregate";

            if (Kind.Equals(numeric))
            {
                Aggregation = aggregation;
                Value       = value;
                Filter      = filter;
                CustomInit();
            }

            if (Kind.Equals(aggregate))
            {
                Aggregation = aggregation;
                Filter      = filter;
                CustomInit();
            }
        }
Ejemplo n.º 9
0
 /// <summary>
 /// Initializes a new instance of the AggregateVariable class.
 /// </summary>
 /// <param name="aggregation">Aggregation time series expression when
 /// kind is "aggregate" is used to represent the aggregation that needs
 /// to be performed directly using event properties like
 /// "$event.Temperature". For example, aggregation for calculating
 /// range of temperature changes can be written as:
 /// "max($event.Temperature)-min($event.Temperature)".</param>
 /// <param name="filter">Filter over the events that restricts the
 /// number of events being considered for computation. Example:
 /// "$event.Status.String='Good'". Optional.</param>
 public AggregateVariable(Tsx aggregation, Tsx filter = default(Tsx))
     : base(filter)
 {
     Aggregation = aggregation;
     CustomInit();
 }
Ejemplo n.º 10
0
 /// <summary>
 /// Initializes a new instance of the Variable class.
 /// </summary>
 /// <param name="filter">Filter over the events that restricts the
 /// number of events being considered for computation. Example:
 /// "$event.Status.String='Good'". Optional.</param>
 public Variable(Tsx filter = default(Tsx))
 {
     Filter = filter;
     CustomInit();
 }