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

One of the unique contributors found by a Contributor Insights rule. If the * rule contains multiple keys, then a unique contributor is a unique combination * of values from all the keys in the rule.

If the rule contains a single * key, then each unique contributor is each unique value for this key.

For * more information, see GetInsightRuleReport.

See * Also:

AWS * API Reference

*/ class InsightRuleContributor { public: AWS_CLOUDWATCH_API InsightRuleContributor(); AWS_CLOUDWATCH_API InsightRuleContributor(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_CLOUDWATCH_API InsightRuleContributor& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_CLOUDWATCH_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; AWS_CLOUDWATCH_API void OutputToStream(Aws::OStream& oStream, const char* location) const; /** *

One of the log entry field keywords that is used to define contributors for * this rule.

*/ inline const Aws::Vector& GetKeys() const{ return m_keys; } /** *

One of the log entry field keywords that is used to define contributors for * this rule.

*/ inline bool KeysHasBeenSet() const { return m_keysHasBeenSet; } /** *

One of the log entry field keywords that is used to define contributors for * this rule.

*/ inline void SetKeys(const Aws::Vector& value) { m_keysHasBeenSet = true; m_keys = value; } /** *

One of the log entry field keywords that is used to define contributors for * this rule.

*/ inline void SetKeys(Aws::Vector&& value) { m_keysHasBeenSet = true; m_keys = std::move(value); } /** *

One of the log entry field keywords that is used to define contributors for * this rule.

*/ inline InsightRuleContributor& WithKeys(const Aws::Vector& value) { SetKeys(value); return *this;} /** *

One of the log entry field keywords that is used to define contributors for * this rule.

*/ inline InsightRuleContributor& WithKeys(Aws::Vector&& value) { SetKeys(std::move(value)); return *this;} /** *

One of the log entry field keywords that is used to define contributors for * this rule.

*/ inline InsightRuleContributor& AddKeys(const Aws::String& value) { m_keysHasBeenSet = true; m_keys.push_back(value); return *this; } /** *

One of the log entry field keywords that is used to define contributors for * this rule.

*/ inline InsightRuleContributor& AddKeys(Aws::String&& value) { m_keysHasBeenSet = true; m_keys.push_back(std::move(value)); return *this; } /** *

One of the log entry field keywords that is used to define contributors for * this rule.

*/ inline InsightRuleContributor& AddKeys(const char* value) { m_keysHasBeenSet = true; m_keys.push_back(value); return *this; } /** *

An approximation of the aggregate value that comes from this contributor.

*/ inline double GetApproximateAggregateValue() const{ return m_approximateAggregateValue; } /** *

An approximation of the aggregate value that comes from this contributor.

*/ inline bool ApproximateAggregateValueHasBeenSet() const { return m_approximateAggregateValueHasBeenSet; } /** *

An approximation of the aggregate value that comes from this contributor.

*/ inline void SetApproximateAggregateValue(double value) { m_approximateAggregateValueHasBeenSet = true; m_approximateAggregateValue = value; } /** *

An approximation of the aggregate value that comes from this contributor.

*/ inline InsightRuleContributor& WithApproximateAggregateValue(double value) { SetApproximateAggregateValue(value); return *this;} /** *

An array of the data points where this contributor is present. Only the data * points when this contributor appeared are included in the array.

*/ inline const Aws::Vector& GetDatapoints() const{ return m_datapoints; } /** *

An array of the data points where this contributor is present. Only the data * points when this contributor appeared are included in the array.

*/ inline bool DatapointsHasBeenSet() const { return m_datapointsHasBeenSet; } /** *

An array of the data points where this contributor is present. Only the data * points when this contributor appeared are included in the array.

*/ inline void SetDatapoints(const Aws::Vector& value) { m_datapointsHasBeenSet = true; m_datapoints = value; } /** *

An array of the data points where this contributor is present. Only the data * points when this contributor appeared are included in the array.

*/ inline void SetDatapoints(Aws::Vector&& value) { m_datapointsHasBeenSet = true; m_datapoints = std::move(value); } /** *

An array of the data points where this contributor is present. Only the data * points when this contributor appeared are included in the array.

*/ inline InsightRuleContributor& WithDatapoints(const Aws::Vector& value) { SetDatapoints(value); return *this;} /** *

An array of the data points where this contributor is present. Only the data * points when this contributor appeared are included in the array.

*/ inline InsightRuleContributor& WithDatapoints(Aws::Vector&& value) { SetDatapoints(std::move(value)); return *this;} /** *

An array of the data points where this contributor is present. Only the data * points when this contributor appeared are included in the array.

*/ inline InsightRuleContributor& AddDatapoints(const InsightRuleContributorDatapoint& value) { m_datapointsHasBeenSet = true; m_datapoints.push_back(value); return *this; } /** *

An array of the data points where this contributor is present. Only the data * points when this contributor appeared are included in the array.

*/ inline InsightRuleContributor& AddDatapoints(InsightRuleContributorDatapoint&& value) { m_datapointsHasBeenSet = true; m_datapoints.push_back(std::move(value)); return *this; } private: Aws::Vector m_keys; bool m_keysHasBeenSet = false; double m_approximateAggregateValue; bool m_approximateAggregateValueHasBeenSet = false; Aws::Vector m_datapoints; bool m_datapointsHasBeenSet = false; }; } // namespace Model } // namespace CloudWatch } // namespace Aws