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

A structure that displays the definition of one extended metric that RUM * sends to CloudWatch or CloudWatch Evidently. For more information, see * Additional metrics that you can send to CloudWatch and CloudWatch * Evidently.

See Also:

AWS * API Reference

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

This field is a map of field paths to dimension names. It defines the * dimensions to associate with this metric in CloudWatch The value of this field * is used only if the metric destination is CloudWatch. If the metric * destination is Evidently, the value of DimensionKeys * is ignored.

*/ inline const Aws::Map& GetDimensionKeys() const{ return m_dimensionKeys; } /** *

This field is a map of field paths to dimension names. It defines the * dimensions to associate with this metric in CloudWatch The value of this field * is used only if the metric destination is CloudWatch. If the metric * destination is Evidently, the value of DimensionKeys * is ignored.

*/ inline bool DimensionKeysHasBeenSet() const { return m_dimensionKeysHasBeenSet; } /** *

This field is a map of field paths to dimension names. It defines the * dimensions to associate with this metric in CloudWatch The value of this field * is used only if the metric destination is CloudWatch. If the metric * destination is Evidently, the value of DimensionKeys * is ignored.

*/ inline void SetDimensionKeys(const Aws::Map& value) { m_dimensionKeysHasBeenSet = true; m_dimensionKeys = value; } /** *

This field is a map of field paths to dimension names. It defines the * dimensions to associate with this metric in CloudWatch The value of this field * is used only if the metric destination is CloudWatch. If the metric * destination is Evidently, the value of DimensionKeys * is ignored.

*/ inline void SetDimensionKeys(Aws::Map&& value) { m_dimensionKeysHasBeenSet = true; m_dimensionKeys = std::move(value); } /** *

This field is a map of field paths to dimension names. It defines the * dimensions to associate with this metric in CloudWatch The value of this field * is used only if the metric destination is CloudWatch. If the metric * destination is Evidently, the value of DimensionKeys * is ignored.

*/ inline MetricDefinition& WithDimensionKeys(const Aws::Map& value) { SetDimensionKeys(value); return *this;} /** *

This field is a map of field paths to dimension names. It defines the * dimensions to associate with this metric in CloudWatch The value of this field * is used only if the metric destination is CloudWatch. If the metric * destination is Evidently, the value of DimensionKeys * is ignored.

*/ inline MetricDefinition& WithDimensionKeys(Aws::Map&& value) { SetDimensionKeys(std::move(value)); return *this;} /** *

This field is a map of field paths to dimension names. It defines the * dimensions to associate with this metric in CloudWatch The value of this field * is used only if the metric destination is CloudWatch. If the metric * destination is Evidently, the value of DimensionKeys * is ignored.

*/ inline MetricDefinition& AddDimensionKeys(const Aws::String& key, const Aws::String& value) { m_dimensionKeysHasBeenSet = true; m_dimensionKeys.emplace(key, value); return *this; } /** *

This field is a map of field paths to dimension names. It defines the * dimensions to associate with this metric in CloudWatch The value of this field * is used only if the metric destination is CloudWatch. If the metric * destination is Evidently, the value of DimensionKeys * is ignored.

*/ inline MetricDefinition& AddDimensionKeys(Aws::String&& key, const Aws::String& value) { m_dimensionKeysHasBeenSet = true; m_dimensionKeys.emplace(std::move(key), value); return *this; } /** *

This field is a map of field paths to dimension names. It defines the * dimensions to associate with this metric in CloudWatch The value of this field * is used only if the metric destination is CloudWatch. If the metric * destination is Evidently, the value of DimensionKeys * is ignored.

*/ inline MetricDefinition& AddDimensionKeys(const Aws::String& key, Aws::String&& value) { m_dimensionKeysHasBeenSet = true; m_dimensionKeys.emplace(key, std::move(value)); return *this; } /** *

This field is a map of field paths to dimension names. It defines the * dimensions to associate with this metric in CloudWatch The value of this field * is used only if the metric destination is CloudWatch. If the metric * destination is Evidently, the value of DimensionKeys * is ignored.

*/ inline MetricDefinition& AddDimensionKeys(Aws::String&& key, Aws::String&& value) { m_dimensionKeysHasBeenSet = true; m_dimensionKeys.emplace(std::move(key), std::move(value)); return *this; } /** *

This field is a map of field paths to dimension names. It defines the * dimensions to associate with this metric in CloudWatch The value of this field * is used only if the metric destination is CloudWatch. If the metric * destination is Evidently, the value of DimensionKeys * is ignored.

*/ inline MetricDefinition& AddDimensionKeys(const char* key, Aws::String&& value) { m_dimensionKeysHasBeenSet = true; m_dimensionKeys.emplace(key, std::move(value)); return *this; } /** *

This field is a map of field paths to dimension names. It defines the * dimensions to associate with this metric in CloudWatch The value of this field * is used only if the metric destination is CloudWatch. If the metric * destination is Evidently, the value of DimensionKeys * is ignored.

*/ inline MetricDefinition& AddDimensionKeys(Aws::String&& key, const char* value) { m_dimensionKeysHasBeenSet = true; m_dimensionKeys.emplace(std::move(key), value); return *this; } /** *

This field is a map of field paths to dimension names. It defines the * dimensions to associate with this metric in CloudWatch The value of this field * is used only if the metric destination is CloudWatch. If the metric * destination is Evidently, the value of DimensionKeys * is ignored.

*/ inline MetricDefinition& AddDimensionKeys(const char* key, const char* value) { m_dimensionKeysHasBeenSet = true; m_dimensionKeys.emplace(key, value); return *this; } /** *

The pattern that defines the metric. RUM checks events that happen in a * user's session against the pattern, and events that match the pattern are sent * to the metric destination.

If the metrics destination is * CloudWatch and the event also matches a value in * DimensionKeys, then the metric is published with the specified * dimensions.

*/ inline const Aws::String& GetEventPattern() const{ return m_eventPattern; } /** *

The pattern that defines the metric. RUM checks events that happen in a * user's session against the pattern, and events that match the pattern are sent * to the metric destination.

If the metrics destination is * CloudWatch and the event also matches a value in * DimensionKeys, then the metric is published with the specified * dimensions.

*/ inline bool EventPatternHasBeenSet() const { return m_eventPatternHasBeenSet; } /** *

The pattern that defines the metric. RUM checks events that happen in a * user's session against the pattern, and events that match the pattern are sent * to the metric destination.

If the metrics destination is * CloudWatch and the event also matches a value in * DimensionKeys, then the metric is published with the specified * dimensions.

*/ inline void SetEventPattern(const Aws::String& value) { m_eventPatternHasBeenSet = true; m_eventPattern = value; } /** *

The pattern that defines the metric. RUM checks events that happen in a * user's session against the pattern, and events that match the pattern are sent * to the metric destination.

If the metrics destination is * CloudWatch and the event also matches a value in * DimensionKeys, then the metric is published with the specified * dimensions.

*/ inline void SetEventPattern(Aws::String&& value) { m_eventPatternHasBeenSet = true; m_eventPattern = std::move(value); } /** *

The pattern that defines the metric. RUM checks events that happen in a * user's session against the pattern, and events that match the pattern are sent * to the metric destination.

If the metrics destination is * CloudWatch and the event also matches a value in * DimensionKeys, then the metric is published with the specified * dimensions.

*/ inline void SetEventPattern(const char* value) { m_eventPatternHasBeenSet = true; m_eventPattern.assign(value); } /** *

The pattern that defines the metric. RUM checks events that happen in a * user's session against the pattern, and events that match the pattern are sent * to the metric destination.

If the metrics destination is * CloudWatch and the event also matches a value in * DimensionKeys, then the metric is published with the specified * dimensions.

*/ inline MetricDefinition& WithEventPattern(const Aws::String& value) { SetEventPattern(value); return *this;} /** *

The pattern that defines the metric. RUM checks events that happen in a * user's session against the pattern, and events that match the pattern are sent * to the metric destination.

If the metrics destination is * CloudWatch and the event also matches a value in * DimensionKeys, then the metric is published with the specified * dimensions.

*/ inline MetricDefinition& WithEventPattern(Aws::String&& value) { SetEventPattern(std::move(value)); return *this;} /** *

The pattern that defines the metric. RUM checks events that happen in a * user's session against the pattern, and events that match the pattern are sent * to the metric destination.

If the metrics destination is * CloudWatch and the event also matches a value in * DimensionKeys, then the metric is published with the specified * dimensions.

*/ inline MetricDefinition& WithEventPattern(const char* value) { SetEventPattern(value); return *this;} /** *

The ID of this metric definition.

*/ inline const Aws::String& GetMetricDefinitionId() const{ return m_metricDefinitionId; } /** *

The ID of this metric definition.

*/ inline bool MetricDefinitionIdHasBeenSet() const { return m_metricDefinitionIdHasBeenSet; } /** *

The ID of this metric definition.

*/ inline void SetMetricDefinitionId(const Aws::String& value) { m_metricDefinitionIdHasBeenSet = true; m_metricDefinitionId = value; } /** *

The ID of this metric definition.

*/ inline void SetMetricDefinitionId(Aws::String&& value) { m_metricDefinitionIdHasBeenSet = true; m_metricDefinitionId = std::move(value); } /** *

The ID of this metric definition.

*/ inline void SetMetricDefinitionId(const char* value) { m_metricDefinitionIdHasBeenSet = true; m_metricDefinitionId.assign(value); } /** *

The ID of this metric definition.

*/ inline MetricDefinition& WithMetricDefinitionId(const Aws::String& value) { SetMetricDefinitionId(value); return *this;} /** *

The ID of this metric definition.

*/ inline MetricDefinition& WithMetricDefinitionId(Aws::String&& value) { SetMetricDefinitionId(std::move(value)); return *this;} /** *

The ID of this metric definition.

*/ inline MetricDefinition& WithMetricDefinitionId(const char* value) { SetMetricDefinitionId(value); return *this;} /** *

The name of the metric that is defined in this structure.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

The name of the metric that is defined in this structure.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The name of the metric that is defined in this structure.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The name of the metric that is defined in this structure.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The name of the metric that is defined in this structure.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

The name of the metric that is defined in this structure.

*/ inline MetricDefinition& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The name of the metric that is defined in this structure.

*/ inline MetricDefinition& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

The name of the metric that is defined in this structure.

*/ inline MetricDefinition& WithName(const char* value) { SetName(value); return *this;} /** *

If this metric definition is for a custom metric instead of an extended * metric, this field displays the metric namespace that the custom metric is * published to.

*/ inline const Aws::String& GetNamespace() const{ return m_namespace; } /** *

If this metric definition is for a custom metric instead of an extended * metric, this field displays the metric namespace that the custom metric is * published to.

*/ inline bool NamespaceHasBeenSet() const { return m_namespaceHasBeenSet; } /** *

If this metric definition is for a custom metric instead of an extended * metric, this field displays the metric namespace that the custom metric is * published to.

*/ inline void SetNamespace(const Aws::String& value) { m_namespaceHasBeenSet = true; m_namespace = value; } /** *

If this metric definition is for a custom metric instead of an extended * metric, this field displays the metric namespace that the custom metric is * published to.

*/ inline void SetNamespace(Aws::String&& value) { m_namespaceHasBeenSet = true; m_namespace = std::move(value); } /** *

If this metric definition is for a custom metric instead of an extended * metric, this field displays the metric namespace that the custom metric is * published to.

*/ inline void SetNamespace(const char* value) { m_namespaceHasBeenSet = true; m_namespace.assign(value); } /** *

If this metric definition is for a custom metric instead of an extended * metric, this field displays the metric namespace that the custom metric is * published to.

*/ inline MetricDefinition& WithNamespace(const Aws::String& value) { SetNamespace(value); return *this;} /** *

If this metric definition is for a custom metric instead of an extended * metric, this field displays the metric namespace that the custom metric is * published to.

*/ inline MetricDefinition& WithNamespace(Aws::String&& value) { SetNamespace(std::move(value)); return *this;} /** *

If this metric definition is for a custom metric instead of an extended * metric, this field displays the metric namespace that the custom metric is * published to.

*/ inline MetricDefinition& WithNamespace(const char* value) { SetNamespace(value); return *this;} /** *

Use this field only if you are sending this metric to CloudWatch. It defines * the CloudWatch metric unit that this metric is measured in.

*/ inline const Aws::String& GetUnitLabel() const{ return m_unitLabel; } /** *

Use this field only if you are sending this metric to CloudWatch. It defines * the CloudWatch metric unit that this metric is measured in.

*/ inline bool UnitLabelHasBeenSet() const { return m_unitLabelHasBeenSet; } /** *

Use this field only if you are sending this metric to CloudWatch. It defines * the CloudWatch metric unit that this metric is measured in.

*/ inline void SetUnitLabel(const Aws::String& value) { m_unitLabelHasBeenSet = true; m_unitLabel = value; } /** *

Use this field only if you are sending this metric to CloudWatch. It defines * the CloudWatch metric unit that this metric is measured in.

*/ inline void SetUnitLabel(Aws::String&& value) { m_unitLabelHasBeenSet = true; m_unitLabel = std::move(value); } /** *

Use this field only if you are sending this metric to CloudWatch. It defines * the CloudWatch metric unit that this metric is measured in.

*/ inline void SetUnitLabel(const char* value) { m_unitLabelHasBeenSet = true; m_unitLabel.assign(value); } /** *

Use this field only if you are sending this metric to CloudWatch. It defines * the CloudWatch metric unit that this metric is measured in.

*/ inline MetricDefinition& WithUnitLabel(const Aws::String& value) { SetUnitLabel(value); return *this;} /** *

Use this field only if you are sending this metric to CloudWatch. It defines * the CloudWatch metric unit that this metric is measured in.

*/ inline MetricDefinition& WithUnitLabel(Aws::String&& value) { SetUnitLabel(std::move(value)); return *this;} /** *

Use this field only if you are sending this metric to CloudWatch. It defines * the CloudWatch metric unit that this metric is measured in.

*/ inline MetricDefinition& WithUnitLabel(const char* value) { SetUnitLabel(value); return *this;} /** *

The field within the event object that the metric value is sourced from.

*/ inline const Aws::String& GetValueKey() const{ return m_valueKey; } /** *

The field within the event object that the metric value is sourced from.

*/ inline bool ValueKeyHasBeenSet() const { return m_valueKeyHasBeenSet; } /** *

The field within the event object that the metric value is sourced from.

*/ inline void SetValueKey(const Aws::String& value) { m_valueKeyHasBeenSet = true; m_valueKey = value; } /** *

The field within the event object that the metric value is sourced from.

*/ inline void SetValueKey(Aws::String&& value) { m_valueKeyHasBeenSet = true; m_valueKey = std::move(value); } /** *

The field within the event object that the metric value is sourced from.

*/ inline void SetValueKey(const char* value) { m_valueKeyHasBeenSet = true; m_valueKey.assign(value); } /** *

The field within the event object that the metric value is sourced from.

*/ inline MetricDefinition& WithValueKey(const Aws::String& value) { SetValueKey(value); return *this;} /** *

The field within the event object that the metric value is sourced from.

*/ inline MetricDefinition& WithValueKey(Aws::String&& value) { SetValueKey(std::move(value)); return *this;} /** *

The field within the event object that the metric value is sourced from.

*/ inline MetricDefinition& WithValueKey(const char* value) { SetValueKey(value); return *this;} private: Aws::Map m_dimensionKeys; bool m_dimensionKeysHasBeenSet = false; Aws::String m_eventPattern; bool m_eventPatternHasBeenSet = false; Aws::String m_metricDefinitionId; bool m_metricDefinitionIdHasBeenSet = false; Aws::String m_name; bool m_nameHasBeenSet = false; Aws::String m_namespace; bool m_namespaceHasBeenSet = false; Aws::String m_unitLabel; bool m_unitLabelHasBeenSet = false; Aws::String m_valueKey; bool m_valueKeyHasBeenSet = false; }; } // namespace Model } // namespace CloudWatchRUM } // namespace Aws