/** * 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 #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace Pinpoint { namespace Model { /** *

Specifies the dimension settings for a segment.

See Also:

AWS * API Reference

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

One or more custom attributes to use as criteria for the segment.

*/ inline const Aws::Map& GetAttributes() const{ return m_attributes; } /** *

One or more custom attributes to use as criteria for the segment.

*/ inline bool AttributesHasBeenSet() const { return m_attributesHasBeenSet; } /** *

One or more custom attributes to use as criteria for the segment.

*/ inline void SetAttributes(const Aws::Map& value) { m_attributesHasBeenSet = true; m_attributes = value; } /** *

One or more custom attributes to use as criteria for the segment.

*/ inline void SetAttributes(Aws::Map&& value) { m_attributesHasBeenSet = true; m_attributes = std::move(value); } /** *

One or more custom attributes to use as criteria for the segment.

*/ inline SegmentDimensions& WithAttributes(const Aws::Map& value) { SetAttributes(value); return *this;} /** *

One or more custom attributes to use as criteria for the segment.

*/ inline SegmentDimensions& WithAttributes(Aws::Map&& value) { SetAttributes(std::move(value)); return *this;} /** *

One or more custom attributes to use as criteria for the segment.

*/ inline SegmentDimensions& AddAttributes(const Aws::String& key, const AttributeDimension& value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, value); return *this; } /** *

One or more custom attributes to use as criteria for the segment.

*/ inline SegmentDimensions& AddAttributes(Aws::String&& key, const AttributeDimension& value) { m_attributesHasBeenSet = true; m_attributes.emplace(std::move(key), value); return *this; } /** *

One or more custom attributes to use as criteria for the segment.

*/ inline SegmentDimensions& AddAttributes(const Aws::String& key, AttributeDimension&& value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, std::move(value)); return *this; } /** *

One or more custom attributes to use as criteria for the segment.

*/ inline SegmentDimensions& AddAttributes(Aws::String&& key, AttributeDimension&& value) { m_attributesHasBeenSet = true; m_attributes.emplace(std::move(key), std::move(value)); return *this; } /** *

One or more custom attributes to use as criteria for the segment.

*/ inline SegmentDimensions& AddAttributes(const char* key, AttributeDimension&& value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, std::move(value)); return *this; } /** *

One or more custom attributes to use as criteria for the segment.

*/ inline SegmentDimensions& AddAttributes(const char* key, const AttributeDimension& value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, value); return *this; } /** *

The behavior-based criteria, such as how recently users have used your app, * for the segment.

*/ inline const SegmentBehaviors& GetBehavior() const{ return m_behavior; } /** *

The behavior-based criteria, such as how recently users have used your app, * for the segment.

*/ inline bool BehaviorHasBeenSet() const { return m_behaviorHasBeenSet; } /** *

The behavior-based criteria, such as how recently users have used your app, * for the segment.

*/ inline void SetBehavior(const SegmentBehaviors& value) { m_behaviorHasBeenSet = true; m_behavior = value; } /** *

The behavior-based criteria, such as how recently users have used your app, * for the segment.

*/ inline void SetBehavior(SegmentBehaviors&& value) { m_behaviorHasBeenSet = true; m_behavior = std::move(value); } /** *

The behavior-based criteria, such as how recently users have used your app, * for the segment.

*/ inline SegmentDimensions& WithBehavior(const SegmentBehaviors& value) { SetBehavior(value); return *this;} /** *

The behavior-based criteria, such as how recently users have used your app, * for the segment.

*/ inline SegmentDimensions& WithBehavior(SegmentBehaviors&& value) { SetBehavior(std::move(value)); return *this;} /** *

The demographic-based criteria, such as device platform, for the segment.

*/ inline const SegmentDemographics& GetDemographic() const{ return m_demographic; } /** *

The demographic-based criteria, such as device platform, for the segment.

*/ inline bool DemographicHasBeenSet() const { return m_demographicHasBeenSet; } /** *

The demographic-based criteria, such as device platform, for the segment.

*/ inline void SetDemographic(const SegmentDemographics& value) { m_demographicHasBeenSet = true; m_demographic = value; } /** *

The demographic-based criteria, such as device platform, for the segment.

*/ inline void SetDemographic(SegmentDemographics&& value) { m_demographicHasBeenSet = true; m_demographic = std::move(value); } /** *

The demographic-based criteria, such as device platform, for the segment.

*/ inline SegmentDimensions& WithDemographic(const SegmentDemographics& value) { SetDemographic(value); return *this;} /** *

The demographic-based criteria, such as device platform, for the segment.

*/ inline SegmentDimensions& WithDemographic(SegmentDemographics&& value) { SetDemographic(std::move(value)); return *this;} /** *

The location-based criteria, such as region or GPS coordinates, for the * segment.

*/ inline const SegmentLocation& GetLocation() const{ return m_location; } /** *

The location-based criteria, such as region or GPS coordinates, for the * segment.

*/ inline bool LocationHasBeenSet() const { return m_locationHasBeenSet; } /** *

The location-based criteria, such as region or GPS coordinates, for the * segment.

*/ inline void SetLocation(const SegmentLocation& value) { m_locationHasBeenSet = true; m_location = value; } /** *

The location-based criteria, such as region or GPS coordinates, for the * segment.

*/ inline void SetLocation(SegmentLocation&& value) { m_locationHasBeenSet = true; m_location = std::move(value); } /** *

The location-based criteria, such as region or GPS coordinates, for the * segment.

*/ inline SegmentDimensions& WithLocation(const SegmentLocation& value) { SetLocation(value); return *this;} /** *

The location-based criteria, such as region or GPS coordinates, for the * segment.

*/ inline SegmentDimensions& WithLocation(SegmentLocation&& value) { SetLocation(std::move(value)); return *this;} /** *

One or more custom metrics to use as criteria for the segment.

*/ inline const Aws::Map& GetMetrics() const{ return m_metrics; } /** *

One or more custom metrics to use as criteria for the segment.

*/ inline bool MetricsHasBeenSet() const { return m_metricsHasBeenSet; } /** *

One or more custom metrics to use as criteria for the segment.

*/ inline void SetMetrics(const Aws::Map& value) { m_metricsHasBeenSet = true; m_metrics = value; } /** *

One or more custom metrics to use as criteria for the segment.

*/ inline void SetMetrics(Aws::Map&& value) { m_metricsHasBeenSet = true; m_metrics = std::move(value); } /** *

One or more custom metrics to use as criteria for the segment.

*/ inline SegmentDimensions& WithMetrics(const Aws::Map& value) { SetMetrics(value); return *this;} /** *

One or more custom metrics to use as criteria for the segment.

*/ inline SegmentDimensions& WithMetrics(Aws::Map&& value) { SetMetrics(std::move(value)); return *this;} /** *

One or more custom metrics to use as criteria for the segment.

*/ inline SegmentDimensions& AddMetrics(const Aws::String& key, const MetricDimension& value) { m_metricsHasBeenSet = true; m_metrics.emplace(key, value); return *this; } /** *

One or more custom metrics to use as criteria for the segment.

*/ inline SegmentDimensions& AddMetrics(Aws::String&& key, const MetricDimension& value) { m_metricsHasBeenSet = true; m_metrics.emplace(std::move(key), value); return *this; } /** *

One or more custom metrics to use as criteria for the segment.

*/ inline SegmentDimensions& AddMetrics(const Aws::String& key, MetricDimension&& value) { m_metricsHasBeenSet = true; m_metrics.emplace(key, std::move(value)); return *this; } /** *

One or more custom metrics to use as criteria for the segment.

*/ inline SegmentDimensions& AddMetrics(Aws::String&& key, MetricDimension&& value) { m_metricsHasBeenSet = true; m_metrics.emplace(std::move(key), std::move(value)); return *this; } /** *

One or more custom metrics to use as criteria for the segment.

*/ inline SegmentDimensions& AddMetrics(const char* key, MetricDimension&& value) { m_metricsHasBeenSet = true; m_metrics.emplace(key, std::move(value)); return *this; } /** *

One or more custom metrics to use as criteria for the segment.

*/ inline SegmentDimensions& AddMetrics(const char* key, const MetricDimension& value) { m_metricsHasBeenSet = true; m_metrics.emplace(key, value); return *this; } /** *

One or more custom user attributes to use as criteria for the segment.

*/ inline const Aws::Map& GetUserAttributes() const{ return m_userAttributes; } /** *

One or more custom user attributes to use as criteria for the segment.

*/ inline bool UserAttributesHasBeenSet() const { return m_userAttributesHasBeenSet; } /** *

One or more custom user attributes to use as criteria for the segment.

*/ inline void SetUserAttributes(const Aws::Map& value) { m_userAttributesHasBeenSet = true; m_userAttributes = value; } /** *

One or more custom user attributes to use as criteria for the segment.

*/ inline void SetUserAttributes(Aws::Map&& value) { m_userAttributesHasBeenSet = true; m_userAttributes = std::move(value); } /** *

One or more custom user attributes to use as criteria for the segment.

*/ inline SegmentDimensions& WithUserAttributes(const Aws::Map& value) { SetUserAttributes(value); return *this;} /** *

One or more custom user attributes to use as criteria for the segment.

*/ inline SegmentDimensions& WithUserAttributes(Aws::Map&& value) { SetUserAttributes(std::move(value)); return *this;} /** *

One or more custom user attributes to use as criteria for the segment.

*/ inline SegmentDimensions& AddUserAttributes(const Aws::String& key, const AttributeDimension& value) { m_userAttributesHasBeenSet = true; m_userAttributes.emplace(key, value); return *this; } /** *

One or more custom user attributes to use as criteria for the segment.

*/ inline SegmentDimensions& AddUserAttributes(Aws::String&& key, const AttributeDimension& value) { m_userAttributesHasBeenSet = true; m_userAttributes.emplace(std::move(key), value); return *this; } /** *

One or more custom user attributes to use as criteria for the segment.

*/ inline SegmentDimensions& AddUserAttributes(const Aws::String& key, AttributeDimension&& value) { m_userAttributesHasBeenSet = true; m_userAttributes.emplace(key, std::move(value)); return *this; } /** *

One or more custom user attributes to use as criteria for the segment.

*/ inline SegmentDimensions& AddUserAttributes(Aws::String&& key, AttributeDimension&& value) { m_userAttributesHasBeenSet = true; m_userAttributes.emplace(std::move(key), std::move(value)); return *this; } /** *

One or more custom user attributes to use as criteria for the segment.

*/ inline SegmentDimensions& AddUserAttributes(const char* key, AttributeDimension&& value) { m_userAttributesHasBeenSet = true; m_userAttributes.emplace(key, std::move(value)); return *this; } /** *

One or more custom user attributes to use as criteria for the segment.

*/ inline SegmentDimensions& AddUserAttributes(const char* key, const AttributeDimension& value) { m_userAttributesHasBeenSet = true; m_userAttributes.emplace(key, value); return *this; } private: Aws::Map m_attributes; bool m_attributesHasBeenSet = false; SegmentBehaviors m_behavior; bool m_behaviorHasBeenSet = false; SegmentDemographics m_demographic; bool m_demographicHasBeenSet = false; SegmentLocation m_location; bool m_locationHasBeenSet = false; Aws::Map m_metrics; bool m_metricsHasBeenSet = false; Aws::Map m_userAttributes; bool m_userAttributesHasBeenSet = false; }; } // namespace Model } // namespace Pinpoint } // namespace Aws