1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #pragma once
7 #include <aws/pinpoint/Pinpoint_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSMap.h>
9 #include <aws/pinpoint/model/SegmentBehaviors.h>
10 #include <aws/pinpoint/model/SegmentDemographics.h>
11 #include <aws/pinpoint/model/SegmentLocation.h>
12 #include <aws/core/utils/memory/stl/AWSString.h>
13 #include <aws/pinpoint/model/AttributeDimension.h>
14 #include <aws/pinpoint/model/MetricDimension.h>
15 #include <utility>
16 
17 namespace Aws
18 {
19 namespace Utils
20 {
21 namespace Json
22 {
23   class JsonValue;
24   class JsonView;
25 } // namespace Json
26 } // namespace Utils
27 namespace Pinpoint
28 {
29 namespace Model
30 {
31 
32   /**
33    * <p>Specifies the dimension settings for a segment.</p><p><h3>See Also:</h3>   <a
34    * href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/SegmentDimensions">AWS
35    * API Reference</a></p>
36    */
37   class AWS_PINPOINT_API SegmentDimensions
38   {
39   public:
40     SegmentDimensions();
41     SegmentDimensions(Aws::Utils::Json::JsonView jsonValue);
42     SegmentDimensions& operator=(Aws::Utils::Json::JsonView jsonValue);
43     Aws::Utils::Json::JsonValue Jsonize() const;
44 
45 
46     /**
47      * <p>One or more custom attributes to use as criteria for the segment.</p>
48      */
GetAttributes()49     inline const Aws::Map<Aws::String, AttributeDimension>& GetAttributes() const{ return m_attributes; }
50 
51     /**
52      * <p>One or more custom attributes to use as criteria for the segment.</p>
53      */
AttributesHasBeenSet()54     inline bool AttributesHasBeenSet() const { return m_attributesHasBeenSet; }
55 
56     /**
57      * <p>One or more custom attributes to use as criteria for the segment.</p>
58      */
SetAttributes(const Aws::Map<Aws::String,AttributeDimension> & value)59     inline void SetAttributes(const Aws::Map<Aws::String, AttributeDimension>& value) { m_attributesHasBeenSet = true; m_attributes = value; }
60 
61     /**
62      * <p>One or more custom attributes to use as criteria for the segment.</p>
63      */
SetAttributes(Aws::Map<Aws::String,AttributeDimension> && value)64     inline void SetAttributes(Aws::Map<Aws::String, AttributeDimension>&& value) { m_attributesHasBeenSet = true; m_attributes = std::move(value); }
65 
66     /**
67      * <p>One or more custom attributes to use as criteria for the segment.</p>
68      */
WithAttributes(const Aws::Map<Aws::String,AttributeDimension> & value)69     inline SegmentDimensions& WithAttributes(const Aws::Map<Aws::String, AttributeDimension>& value) { SetAttributes(value); return *this;}
70 
71     /**
72      * <p>One or more custom attributes to use as criteria for the segment.</p>
73      */
WithAttributes(Aws::Map<Aws::String,AttributeDimension> && value)74     inline SegmentDimensions& WithAttributes(Aws::Map<Aws::String, AttributeDimension>&& value) { SetAttributes(std::move(value)); return *this;}
75 
76     /**
77      * <p>One or more custom attributes to use as criteria for the segment.</p>
78      */
AddAttributes(const Aws::String & key,const AttributeDimension & value)79     inline SegmentDimensions& AddAttributes(const Aws::String& key, const AttributeDimension& value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, value); return *this; }
80 
81     /**
82      * <p>One or more custom attributes to use as criteria for the segment.</p>
83      */
AddAttributes(Aws::String && key,const AttributeDimension & value)84     inline SegmentDimensions& AddAttributes(Aws::String&& key, const AttributeDimension& value) { m_attributesHasBeenSet = true; m_attributes.emplace(std::move(key), value); return *this; }
85 
86     /**
87      * <p>One or more custom attributes to use as criteria for the segment.</p>
88      */
AddAttributes(const Aws::String & key,AttributeDimension && value)89     inline SegmentDimensions& AddAttributes(const Aws::String& key, AttributeDimension&& value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, std::move(value)); return *this; }
90 
91     /**
92      * <p>One or more custom attributes to use as criteria for the segment.</p>
93      */
AddAttributes(Aws::String && key,AttributeDimension && value)94     inline SegmentDimensions& AddAttributes(Aws::String&& key, AttributeDimension&& value) { m_attributesHasBeenSet = true; m_attributes.emplace(std::move(key), std::move(value)); return *this; }
95 
96     /**
97      * <p>One or more custom attributes to use as criteria for the segment.</p>
98      */
AddAttributes(const char * key,AttributeDimension && value)99     inline SegmentDimensions& AddAttributes(const char* key, AttributeDimension&& value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, std::move(value)); return *this; }
100 
101     /**
102      * <p>One or more custom attributes to use as criteria for the segment.</p>
103      */
AddAttributes(const char * key,const AttributeDimension & value)104     inline SegmentDimensions& AddAttributes(const char* key, const AttributeDimension& value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, value); return *this; }
105 
106 
107     /**
108      * <p>The behavior-based criteria, such as how recently users have used your app,
109      * for the segment.</p>
110      */
GetBehavior()111     inline const SegmentBehaviors& GetBehavior() const{ return m_behavior; }
112 
113     /**
114      * <p>The behavior-based criteria, such as how recently users have used your app,
115      * for the segment.</p>
116      */
BehaviorHasBeenSet()117     inline bool BehaviorHasBeenSet() const { return m_behaviorHasBeenSet; }
118 
119     /**
120      * <p>The behavior-based criteria, such as how recently users have used your app,
121      * for the segment.</p>
122      */
SetBehavior(const SegmentBehaviors & value)123     inline void SetBehavior(const SegmentBehaviors& value) { m_behaviorHasBeenSet = true; m_behavior = value; }
124 
125     /**
126      * <p>The behavior-based criteria, such as how recently users have used your app,
127      * for the segment.</p>
128      */
SetBehavior(SegmentBehaviors && value)129     inline void SetBehavior(SegmentBehaviors&& value) { m_behaviorHasBeenSet = true; m_behavior = std::move(value); }
130 
131     /**
132      * <p>The behavior-based criteria, such as how recently users have used your app,
133      * for the segment.</p>
134      */
WithBehavior(const SegmentBehaviors & value)135     inline SegmentDimensions& WithBehavior(const SegmentBehaviors& value) { SetBehavior(value); return *this;}
136 
137     /**
138      * <p>The behavior-based criteria, such as how recently users have used your app,
139      * for the segment.</p>
140      */
WithBehavior(SegmentBehaviors && value)141     inline SegmentDimensions& WithBehavior(SegmentBehaviors&& value) { SetBehavior(std::move(value)); return *this;}
142 
143 
144     /**
145      * <p>The demographic-based criteria, such as device platform, for the segment.</p>
146      */
GetDemographic()147     inline const SegmentDemographics& GetDemographic() const{ return m_demographic; }
148 
149     /**
150      * <p>The demographic-based criteria, such as device platform, for the segment.</p>
151      */
DemographicHasBeenSet()152     inline bool DemographicHasBeenSet() const { return m_demographicHasBeenSet; }
153 
154     /**
155      * <p>The demographic-based criteria, such as device platform, for the segment.</p>
156      */
SetDemographic(const SegmentDemographics & value)157     inline void SetDemographic(const SegmentDemographics& value) { m_demographicHasBeenSet = true; m_demographic = value; }
158 
159     /**
160      * <p>The demographic-based criteria, such as device platform, for the segment.</p>
161      */
SetDemographic(SegmentDemographics && value)162     inline void SetDemographic(SegmentDemographics&& value) { m_demographicHasBeenSet = true; m_demographic = std::move(value); }
163 
164     /**
165      * <p>The demographic-based criteria, such as device platform, for the segment.</p>
166      */
WithDemographic(const SegmentDemographics & value)167     inline SegmentDimensions& WithDemographic(const SegmentDemographics& value) { SetDemographic(value); return *this;}
168 
169     /**
170      * <p>The demographic-based criteria, such as device platform, for the segment.</p>
171      */
WithDemographic(SegmentDemographics && value)172     inline SegmentDimensions& WithDemographic(SegmentDemographics&& value) { SetDemographic(std::move(value)); return *this;}
173 
174 
175     /**
176      * <p>The location-based criteria, such as region or GPS coordinates, for the
177      * segment.</p>
178      */
GetLocation()179     inline const SegmentLocation& GetLocation() const{ return m_location; }
180 
181     /**
182      * <p>The location-based criteria, such as region or GPS coordinates, for the
183      * segment.</p>
184      */
LocationHasBeenSet()185     inline bool LocationHasBeenSet() const { return m_locationHasBeenSet; }
186 
187     /**
188      * <p>The location-based criteria, such as region or GPS coordinates, for the
189      * segment.</p>
190      */
SetLocation(const SegmentLocation & value)191     inline void SetLocation(const SegmentLocation& value) { m_locationHasBeenSet = true; m_location = value; }
192 
193     /**
194      * <p>The location-based criteria, such as region or GPS coordinates, for the
195      * segment.</p>
196      */
SetLocation(SegmentLocation && value)197     inline void SetLocation(SegmentLocation&& value) { m_locationHasBeenSet = true; m_location = std::move(value); }
198 
199     /**
200      * <p>The location-based criteria, such as region or GPS coordinates, for the
201      * segment.</p>
202      */
WithLocation(const SegmentLocation & value)203     inline SegmentDimensions& WithLocation(const SegmentLocation& value) { SetLocation(value); return *this;}
204 
205     /**
206      * <p>The location-based criteria, such as region or GPS coordinates, for the
207      * segment.</p>
208      */
WithLocation(SegmentLocation && value)209     inline SegmentDimensions& WithLocation(SegmentLocation&& value) { SetLocation(std::move(value)); return *this;}
210 
211 
212     /**
213      * <p>One or more custom metrics to use as criteria for the segment.</p>
214      */
GetMetrics()215     inline const Aws::Map<Aws::String, MetricDimension>& GetMetrics() const{ return m_metrics; }
216 
217     /**
218      * <p>One or more custom metrics to use as criteria for the segment.</p>
219      */
MetricsHasBeenSet()220     inline bool MetricsHasBeenSet() const { return m_metricsHasBeenSet; }
221 
222     /**
223      * <p>One or more custom metrics to use as criteria for the segment.</p>
224      */
SetMetrics(const Aws::Map<Aws::String,MetricDimension> & value)225     inline void SetMetrics(const Aws::Map<Aws::String, MetricDimension>& value) { m_metricsHasBeenSet = true; m_metrics = value; }
226 
227     /**
228      * <p>One or more custom metrics to use as criteria for the segment.</p>
229      */
SetMetrics(Aws::Map<Aws::String,MetricDimension> && value)230     inline void SetMetrics(Aws::Map<Aws::String, MetricDimension>&& value) { m_metricsHasBeenSet = true; m_metrics = std::move(value); }
231 
232     /**
233      * <p>One or more custom metrics to use as criteria for the segment.</p>
234      */
WithMetrics(const Aws::Map<Aws::String,MetricDimension> & value)235     inline SegmentDimensions& WithMetrics(const Aws::Map<Aws::String, MetricDimension>& value) { SetMetrics(value); return *this;}
236 
237     /**
238      * <p>One or more custom metrics to use as criteria for the segment.</p>
239      */
WithMetrics(Aws::Map<Aws::String,MetricDimension> && value)240     inline SegmentDimensions& WithMetrics(Aws::Map<Aws::String, MetricDimension>&& value) { SetMetrics(std::move(value)); return *this;}
241 
242     /**
243      * <p>One or more custom metrics to use as criteria for the segment.</p>
244      */
AddMetrics(const Aws::String & key,const MetricDimension & value)245     inline SegmentDimensions& AddMetrics(const Aws::String& key, const MetricDimension& value) { m_metricsHasBeenSet = true; m_metrics.emplace(key, value); return *this; }
246 
247     /**
248      * <p>One or more custom metrics to use as criteria for the segment.</p>
249      */
AddMetrics(Aws::String && key,const MetricDimension & value)250     inline SegmentDimensions& AddMetrics(Aws::String&& key, const MetricDimension& value) { m_metricsHasBeenSet = true; m_metrics.emplace(std::move(key), value); return *this; }
251 
252     /**
253      * <p>One or more custom metrics to use as criteria for the segment.</p>
254      */
AddMetrics(const Aws::String & key,MetricDimension && value)255     inline SegmentDimensions& AddMetrics(const Aws::String& key, MetricDimension&& value) { m_metricsHasBeenSet = true; m_metrics.emplace(key, std::move(value)); return *this; }
256 
257     /**
258      * <p>One or more custom metrics to use as criteria for the segment.</p>
259      */
AddMetrics(Aws::String && key,MetricDimension && value)260     inline SegmentDimensions& AddMetrics(Aws::String&& key, MetricDimension&& value) { m_metricsHasBeenSet = true; m_metrics.emplace(std::move(key), std::move(value)); return *this; }
261 
262     /**
263      * <p>One or more custom metrics to use as criteria for the segment.</p>
264      */
AddMetrics(const char * key,MetricDimension && value)265     inline SegmentDimensions& AddMetrics(const char* key, MetricDimension&& value) { m_metricsHasBeenSet = true; m_metrics.emplace(key, std::move(value)); return *this; }
266 
267     /**
268      * <p>One or more custom metrics to use as criteria for the segment.</p>
269      */
AddMetrics(const char * key,const MetricDimension & value)270     inline SegmentDimensions& AddMetrics(const char* key, const MetricDimension& value) { m_metricsHasBeenSet = true; m_metrics.emplace(key, value); return *this; }
271 
272 
273     /**
274      * <p>One or more custom user attributes to use as criteria for the segment.</p>
275      */
GetUserAttributes()276     inline const Aws::Map<Aws::String, AttributeDimension>& GetUserAttributes() const{ return m_userAttributes; }
277 
278     /**
279      * <p>One or more custom user attributes to use as criteria for the segment.</p>
280      */
UserAttributesHasBeenSet()281     inline bool UserAttributesHasBeenSet() const { return m_userAttributesHasBeenSet; }
282 
283     /**
284      * <p>One or more custom user attributes to use as criteria for the segment.</p>
285      */
SetUserAttributes(const Aws::Map<Aws::String,AttributeDimension> & value)286     inline void SetUserAttributes(const Aws::Map<Aws::String, AttributeDimension>& value) { m_userAttributesHasBeenSet = true; m_userAttributes = value; }
287 
288     /**
289      * <p>One or more custom user attributes to use as criteria for the segment.</p>
290      */
SetUserAttributes(Aws::Map<Aws::String,AttributeDimension> && value)291     inline void SetUserAttributes(Aws::Map<Aws::String, AttributeDimension>&& value) { m_userAttributesHasBeenSet = true; m_userAttributes = std::move(value); }
292 
293     /**
294      * <p>One or more custom user attributes to use as criteria for the segment.</p>
295      */
WithUserAttributes(const Aws::Map<Aws::String,AttributeDimension> & value)296     inline SegmentDimensions& WithUserAttributes(const Aws::Map<Aws::String, AttributeDimension>& value) { SetUserAttributes(value); return *this;}
297 
298     /**
299      * <p>One or more custom user attributes to use as criteria for the segment.</p>
300      */
WithUserAttributes(Aws::Map<Aws::String,AttributeDimension> && value)301     inline SegmentDimensions& WithUserAttributes(Aws::Map<Aws::String, AttributeDimension>&& value) { SetUserAttributes(std::move(value)); return *this;}
302 
303     /**
304      * <p>One or more custom user attributes to use as criteria for the segment.</p>
305      */
AddUserAttributes(const Aws::String & key,const AttributeDimension & value)306     inline SegmentDimensions& AddUserAttributes(const Aws::String& key, const AttributeDimension& value) { m_userAttributesHasBeenSet = true; m_userAttributes.emplace(key, value); return *this; }
307 
308     /**
309      * <p>One or more custom user attributes to use as criteria for the segment.</p>
310      */
AddUserAttributes(Aws::String && key,const AttributeDimension & value)311     inline SegmentDimensions& AddUserAttributes(Aws::String&& key, const AttributeDimension& value) { m_userAttributesHasBeenSet = true; m_userAttributes.emplace(std::move(key), value); return *this; }
312 
313     /**
314      * <p>One or more custom user attributes to use as criteria for the segment.</p>
315      */
AddUserAttributes(const Aws::String & key,AttributeDimension && value)316     inline SegmentDimensions& AddUserAttributes(const Aws::String& key, AttributeDimension&& value) { m_userAttributesHasBeenSet = true; m_userAttributes.emplace(key, std::move(value)); return *this; }
317 
318     /**
319      * <p>One or more custom user attributes to use as criteria for the segment.</p>
320      */
AddUserAttributes(Aws::String && key,AttributeDimension && value)321     inline SegmentDimensions& AddUserAttributes(Aws::String&& key, AttributeDimension&& value) { m_userAttributesHasBeenSet = true; m_userAttributes.emplace(std::move(key), std::move(value)); return *this; }
322 
323     /**
324      * <p>One or more custom user attributes to use as criteria for the segment.</p>
325      */
AddUserAttributes(const char * key,AttributeDimension && value)326     inline SegmentDimensions& AddUserAttributes(const char* key, AttributeDimension&& value) { m_userAttributesHasBeenSet = true; m_userAttributes.emplace(key, std::move(value)); return *this; }
327 
328     /**
329      * <p>One or more custom user attributes to use as criteria for the segment.</p>
330      */
AddUserAttributes(const char * key,const AttributeDimension & value)331     inline SegmentDimensions& AddUserAttributes(const char* key, const AttributeDimension& value) { m_userAttributesHasBeenSet = true; m_userAttributes.emplace(key, value); return *this; }
332 
333   private:
334 
335     Aws::Map<Aws::String, AttributeDimension> m_attributes;
336     bool m_attributesHasBeenSet;
337 
338     SegmentBehaviors m_behavior;
339     bool m_behaviorHasBeenSet;
340 
341     SegmentDemographics m_demographic;
342     bool m_demographicHasBeenSet;
343 
344     SegmentLocation m_location;
345     bool m_locationHasBeenSet;
346 
347     Aws::Map<Aws::String, MetricDimension> m_metrics;
348     bool m_metricsHasBeenSet;
349 
350     Aws::Map<Aws::String, AttributeDimension> m_userAttributes;
351     bool m_userAttributesHasBeenSet;
352   };
353 
354 } // namespace Model
355 } // namespace Pinpoint
356 } // namespace Aws
357