/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace IoTSiteWise { namespace Model { /** *

Contains an asset metric property. With metrics, you can calculate aggregate * functions, such as an average, maximum, or minimum, as specified through an * expression. A metric maps several values to a single value (such as a sum).

*

The maximum number of dependent/cascading variables used in any one metric * calculation is 10. Therefore, a root metric can have up to 10 cascading * metrics in its computational dependency tree. Additionally, a metric can only * have a data type of DOUBLE and consume properties with data types * of INTEGER or DOUBLE.

For more information, see * Metrics * in the IoT SiteWise User Guide.

See Also:

AWS * API Reference

*/ class Metric { public: AWS_IOTSITEWISE_API Metric(); AWS_IOTSITEWISE_API Metric(Aws::Utils::Json::JsonView jsonValue); AWS_IOTSITEWISE_API Metric& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_IOTSITEWISE_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The mathematical expression that defines the metric aggregation function. You * can specify up to 10 variables per expression. You can specify up to 10 * functions per expression.

For more information, see Quotas * in the IoT SiteWise User Guide.

*/ inline const Aws::String& GetExpression() const{ return m_expression; } /** *

The mathematical expression that defines the metric aggregation function. You * can specify up to 10 variables per expression. You can specify up to 10 * functions per expression.

For more information, see Quotas * in the IoT SiteWise User Guide.

*/ inline bool ExpressionHasBeenSet() const { return m_expressionHasBeenSet; } /** *

The mathematical expression that defines the metric aggregation function. You * can specify up to 10 variables per expression. You can specify up to 10 * functions per expression.

For more information, see Quotas * in the IoT SiteWise User Guide.

*/ inline void SetExpression(const Aws::String& value) { m_expressionHasBeenSet = true; m_expression = value; } /** *

The mathematical expression that defines the metric aggregation function. You * can specify up to 10 variables per expression. You can specify up to 10 * functions per expression.

For more information, see Quotas * in the IoT SiteWise User Guide.

*/ inline void SetExpression(Aws::String&& value) { m_expressionHasBeenSet = true; m_expression = std::move(value); } /** *

The mathematical expression that defines the metric aggregation function. You * can specify up to 10 variables per expression. You can specify up to 10 * functions per expression.

For more information, see Quotas * in the IoT SiteWise User Guide.

*/ inline void SetExpression(const char* value) { m_expressionHasBeenSet = true; m_expression.assign(value); } /** *

The mathematical expression that defines the metric aggregation function. You * can specify up to 10 variables per expression. You can specify up to 10 * functions per expression.

For more information, see Quotas * in the IoT SiteWise User Guide.

*/ inline Metric& WithExpression(const Aws::String& value) { SetExpression(value); return *this;} /** *

The mathematical expression that defines the metric aggregation function. You * can specify up to 10 variables per expression. You can specify up to 10 * functions per expression.

For more information, see Quotas * in the IoT SiteWise User Guide.

*/ inline Metric& WithExpression(Aws::String&& value) { SetExpression(std::move(value)); return *this;} /** *

The mathematical expression that defines the metric aggregation function. You * can specify up to 10 variables per expression. You can specify up to 10 * functions per expression.

For more information, see Quotas * in the IoT SiteWise User Guide.

*/ inline Metric& WithExpression(const char* value) { SetExpression(value); return *this;} /** *

The list of variables used in the expression.

*/ inline const Aws::Vector& GetVariables() const{ return m_variables; } /** *

The list of variables used in the expression.

*/ inline bool VariablesHasBeenSet() const { return m_variablesHasBeenSet; } /** *

The list of variables used in the expression.

*/ inline void SetVariables(const Aws::Vector& value) { m_variablesHasBeenSet = true; m_variables = value; } /** *

The list of variables used in the expression.

*/ inline void SetVariables(Aws::Vector&& value) { m_variablesHasBeenSet = true; m_variables = std::move(value); } /** *

The list of variables used in the expression.

*/ inline Metric& WithVariables(const Aws::Vector& value) { SetVariables(value); return *this;} /** *

The list of variables used in the expression.

*/ inline Metric& WithVariables(Aws::Vector&& value) { SetVariables(std::move(value)); return *this;} /** *

The list of variables used in the expression.

*/ inline Metric& AddVariables(const ExpressionVariable& value) { m_variablesHasBeenSet = true; m_variables.push_back(value); return *this; } /** *

The list of variables used in the expression.

*/ inline Metric& AddVariables(ExpressionVariable&& value) { m_variablesHasBeenSet = true; m_variables.push_back(std::move(value)); return *this; } /** *

The window (time interval) over which IoT SiteWise computes the metric's * aggregation expression. IoT SiteWise computes one data point per * window.

*/ inline const MetricWindow& GetWindow() const{ return m_window; } /** *

The window (time interval) over which IoT SiteWise computes the metric's * aggregation expression. IoT SiteWise computes one data point per * window.

*/ inline bool WindowHasBeenSet() const { return m_windowHasBeenSet; } /** *

The window (time interval) over which IoT SiteWise computes the metric's * aggregation expression. IoT SiteWise computes one data point per * window.

*/ inline void SetWindow(const MetricWindow& value) { m_windowHasBeenSet = true; m_window = value; } /** *

The window (time interval) over which IoT SiteWise computes the metric's * aggregation expression. IoT SiteWise computes one data point per * window.

*/ inline void SetWindow(MetricWindow&& value) { m_windowHasBeenSet = true; m_window = std::move(value); } /** *

The window (time interval) over which IoT SiteWise computes the metric's * aggregation expression. IoT SiteWise computes one data point per * window.

*/ inline Metric& WithWindow(const MetricWindow& value) { SetWindow(value); return *this;} /** *

The window (time interval) over which IoT SiteWise computes the metric's * aggregation expression. IoT SiteWise computes one data point per * window.

*/ inline Metric& WithWindow(MetricWindow&& value) { SetWindow(std::move(value)); return *this;} /** *

The processing configuration for the given metric property. You can configure * metrics to be computed at the edge or in the Amazon Web Services Cloud. By * default, metrics are forwarded to the cloud.

*/ inline const MetricProcessingConfig& GetProcessingConfig() const{ return m_processingConfig; } /** *

The processing configuration for the given metric property. You can configure * metrics to be computed at the edge or in the Amazon Web Services Cloud. By * default, metrics are forwarded to the cloud.

*/ inline bool ProcessingConfigHasBeenSet() const { return m_processingConfigHasBeenSet; } /** *

The processing configuration for the given metric property. You can configure * metrics to be computed at the edge or in the Amazon Web Services Cloud. By * default, metrics are forwarded to the cloud.

*/ inline void SetProcessingConfig(const MetricProcessingConfig& value) { m_processingConfigHasBeenSet = true; m_processingConfig = value; } /** *

The processing configuration for the given metric property. You can configure * metrics to be computed at the edge or in the Amazon Web Services Cloud. By * default, metrics are forwarded to the cloud.

*/ inline void SetProcessingConfig(MetricProcessingConfig&& value) { m_processingConfigHasBeenSet = true; m_processingConfig = std::move(value); } /** *

The processing configuration for the given metric property. You can configure * metrics to be computed at the edge or in the Amazon Web Services Cloud. By * default, metrics are forwarded to the cloud.

*/ inline Metric& WithProcessingConfig(const MetricProcessingConfig& value) { SetProcessingConfig(value); return *this;} /** *

The processing configuration for the given metric property. You can configure * metrics to be computed at the edge or in the Amazon Web Services Cloud. By * default, metrics are forwarded to the cloud.

*/ inline Metric& WithProcessingConfig(MetricProcessingConfig&& value) { SetProcessingConfig(std::move(value)); return *this;} private: Aws::String m_expression; bool m_expressionHasBeenSet = false; Aws::Vector m_variables; bool m_variablesHasBeenSet = false; MetricWindow m_window; bool m_windowHasBeenSet = false; MetricProcessingConfig m_processingConfig; bool m_processingConfigHasBeenSet = false; }; } // namespace Model } // namespace IoTSiteWise } // namespace Aws