AWS SDK for C++

AWS SDK for C++ Version 1.11.741

Loading...
Searching...
No Matches
SegmentDimensions.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSMap.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/pinpoint/Pinpoint_EXPORTS.h>
10#include <aws/pinpoint/model/AttributeDimension.h>
11#include <aws/pinpoint/model/MetricDimension.h>
12#include <aws/pinpoint/model/SegmentBehaviors.h>
13#include <aws/pinpoint/model/SegmentDemographics.h>
14#include <aws/pinpoint/model/SegmentLocation.h>
15
16#include <utility>
17
18namespace Aws {
19namespace Utils {
20namespace Json {
21class JsonValue;
22class JsonView;
23} // namespace Json
24} // namespace Utils
25namespace Pinpoint {
26namespace Model {
27
34 public:
35 AWS_PINPOINT_API SegmentDimensions() = default;
36 AWS_PINPOINT_API SegmentDimensions(Aws::Utils::Json::JsonView jsonValue);
38 AWS_PINPOINT_API Aws::Utils::Json::JsonValue Jsonize() const;
39
41
44 inline const Aws::Map<Aws::String, AttributeDimension>& GetAttributes() const { return m_attributes; }
45 inline bool AttributesHasBeenSet() const { return m_attributesHasBeenSet; }
46 template <typename AttributesT = Aws::Map<Aws::String, AttributeDimension>>
47 void SetAttributes(AttributesT&& value) {
48 m_attributesHasBeenSet = true;
49 m_attributes = std::forward<AttributesT>(value);
50 }
51 template <typename AttributesT = Aws::Map<Aws::String, AttributeDimension>>
52 SegmentDimensions& WithAttributes(AttributesT&& value) {
53 SetAttributes(std::forward<AttributesT>(value));
54 return *this;
55 }
56 template <typename AttributesKeyT = Aws::String, typename AttributesValueT = AttributeDimension>
57 SegmentDimensions& AddAttributes(AttributesKeyT&& key, AttributesValueT&& value) {
58 m_attributesHasBeenSet = true;
59 m_attributes.emplace(std::forward<AttributesKeyT>(key), std::forward<AttributesValueT>(value));
60 return *this;
61 }
63
65
69 inline const SegmentBehaviors& GetBehavior() const { return m_behavior; }
70 inline bool BehaviorHasBeenSet() const { return m_behaviorHasBeenSet; }
71 template <typename BehaviorT = SegmentBehaviors>
72 void SetBehavior(BehaviorT&& value) {
73 m_behaviorHasBeenSet = true;
74 m_behavior = std::forward<BehaviorT>(value);
75 }
76 template <typename BehaviorT = SegmentBehaviors>
77 SegmentDimensions& WithBehavior(BehaviorT&& value) {
78 SetBehavior(std::forward<BehaviorT>(value));
79 return *this;
80 }
82
84
87 inline const SegmentDemographics& GetDemographic() const { return m_demographic; }
88 inline bool DemographicHasBeenSet() const { return m_demographicHasBeenSet; }
89 template <typename DemographicT = SegmentDemographics>
90 void SetDemographic(DemographicT&& value) {
91 m_demographicHasBeenSet = true;
92 m_demographic = std::forward<DemographicT>(value);
93 }
94 template <typename DemographicT = SegmentDemographics>
95 SegmentDimensions& WithDemographic(DemographicT&& value) {
96 SetDemographic(std::forward<DemographicT>(value));
97 return *this;
98 }
100
102
106 inline const SegmentLocation& GetLocation() const { return m_location; }
107 inline bool LocationHasBeenSet() const { return m_locationHasBeenSet; }
108 template <typename LocationT = SegmentLocation>
109 void SetLocation(LocationT&& value) {
110 m_locationHasBeenSet = true;
111 m_location = std::forward<LocationT>(value);
112 }
113 template <typename LocationT = SegmentLocation>
114 SegmentDimensions& WithLocation(LocationT&& value) {
115 SetLocation(std::forward<LocationT>(value));
116 return *this;
117 }
119
121
124 inline const Aws::Map<Aws::String, MetricDimension>& GetMetrics() const { return m_metrics; }
125 inline bool MetricsHasBeenSet() const { return m_metricsHasBeenSet; }
126 template <typename MetricsT = Aws::Map<Aws::String, MetricDimension>>
127 void SetMetrics(MetricsT&& value) {
128 m_metricsHasBeenSet = true;
129 m_metrics = std::forward<MetricsT>(value);
130 }
131 template <typename MetricsT = Aws::Map<Aws::String, MetricDimension>>
132 SegmentDimensions& WithMetrics(MetricsT&& value) {
133 SetMetrics(std::forward<MetricsT>(value));
134 return *this;
135 }
136 template <typename MetricsKeyT = Aws::String, typename MetricsValueT = MetricDimension>
137 SegmentDimensions& AddMetrics(MetricsKeyT&& key, MetricsValueT&& value) {
138 m_metricsHasBeenSet = true;
139 m_metrics.emplace(std::forward<MetricsKeyT>(key), std::forward<MetricsValueT>(value));
140 return *this;
141 }
143
145
148 inline const Aws::Map<Aws::String, AttributeDimension>& GetUserAttributes() const { return m_userAttributes; }
149 inline bool UserAttributesHasBeenSet() const { return m_userAttributesHasBeenSet; }
150 template <typename UserAttributesT = Aws::Map<Aws::String, AttributeDimension>>
151 void SetUserAttributes(UserAttributesT&& value) {
152 m_userAttributesHasBeenSet = true;
153 m_userAttributes = std::forward<UserAttributesT>(value);
154 }
155 template <typename UserAttributesT = Aws::Map<Aws::String, AttributeDimension>>
156 SegmentDimensions& WithUserAttributes(UserAttributesT&& value) {
157 SetUserAttributes(std::forward<UserAttributesT>(value));
158 return *this;
159 }
160 template <typename UserAttributesKeyT = Aws::String, typename UserAttributesValueT = AttributeDimension>
161 SegmentDimensions& AddUserAttributes(UserAttributesKeyT&& key, UserAttributesValueT&& value) {
162 m_userAttributesHasBeenSet = true;
163 m_userAttributes.emplace(std::forward<UserAttributesKeyT>(key), std::forward<UserAttributesValueT>(value));
164 return *this;
165 }
167 private:
169
170 SegmentBehaviors m_behavior;
171
172 SegmentDemographics m_demographic;
173
174 SegmentLocation m_location;
175
177
179 bool m_attributesHasBeenSet = false;
180 bool m_behaviorHasBeenSet = false;
181 bool m_demographicHasBeenSet = false;
182 bool m_locationHasBeenSet = false;
183 bool m_metricsHasBeenSet = false;
184 bool m_userAttributesHasBeenSet = false;
185};
186
187} // namespace Model
188} // namespace Pinpoint
189} // namespace Aws
AWS_PINPOINT_API Aws::Utils::Json::JsonValue Jsonize() const
SegmentDimensions & WithMetrics(MetricsT &&value)
SegmentDimensions & WithLocation(LocationT &&value)
AWS_PINPOINT_API SegmentDimensions()=default
SegmentDimensions & AddUserAttributes(UserAttributesKeyT &&key, UserAttributesValueT &&value)
SegmentDimensions & WithAttributes(AttributesT &&value)
SegmentDimensions & WithDemographic(DemographicT &&value)
const Aws::Map< Aws::String, AttributeDimension > & GetUserAttributes() const
const Aws::Map< Aws::String, AttributeDimension > & GetAttributes() const
void SetDemographic(DemographicT &&value)
SegmentDimensions & WithBehavior(BehaviorT &&value)
AWS_PINPOINT_API SegmentDimensions(Aws::Utils::Json::JsonView jsonValue)
SegmentDimensions & AddMetrics(MetricsKeyT &&key, MetricsValueT &&value)
const SegmentDemographics & GetDemographic() const
SegmentDimensions & AddAttributes(AttributesKeyT &&key, AttributesValueT &&value)
const SegmentBehaviors & GetBehavior() const
SegmentDimensions & WithUserAttributes(UserAttributesT &&value)
const SegmentLocation & GetLocation() const
void SetUserAttributes(UserAttributesT &&value)
AWS_PINPOINT_API SegmentDimensions & operator=(Aws::Utils::Json::JsonView jsonValue)
const Aws::Map< Aws::String, MetricDimension > & GetMetrics() const
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
Aws::Utils::Json::JsonValue JsonValue