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/pinpoint/model/Condition.h>
9 #include <aws/pinpoint/model/WaitTime.h>
10 #include <aws/core/utils/memory/stl/AWSString.h>
11 #include <utility>
12 
13 namespace Aws
14 {
15 namespace Utils
16 {
17 namespace Json
18 {
19   class JsonValue;
20   class JsonView;
21 } // namespace Json
22 } // namespace Utils
23 namespace Pinpoint
24 {
25 namespace Model
26 {
27 
28   /**
29    * <p>Specifies the settings for a yes/no split activity in a journey. This type of
30    * activity sends participants down one of two paths in a journey, based on
31    * conditions that you specify.</p> <p>To create yes/no split activities that
32    * send participants down different paths based on push notification events (such
33    * as Open or Received events), your mobile app has to specify the User ID and
34    * Endpoint ID values. For more information, see <a
35    * href="https://docs.aws.amazon.com/pinpoint/latest/developerguide/integrate.html">Integrating
36    * Amazon Pinpoint with your application</a> in the <i>Amazon Pinpoint Developer
37    * Guide</i>.</p><p><h3>See Also:</h3>   <a
38    * href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/ConditionalSplitActivity">AWS
39    * API Reference</a></p>
40    */
41   class AWS_PINPOINT_API ConditionalSplitActivity
42   {
43   public:
44     ConditionalSplitActivity();
45     ConditionalSplitActivity(Aws::Utils::Json::JsonView jsonValue);
46     ConditionalSplitActivity& operator=(Aws::Utils::Json::JsonView jsonValue);
47     Aws::Utils::Json::JsonValue Jsonize() const;
48 
49 
50     /**
51      * <p>The conditions that define the paths for the activity, and the relationship
52      * between the conditions.</p>
53      */
GetCondition()54     inline const Condition& GetCondition() const{ return m_condition; }
55 
56     /**
57      * <p>The conditions that define the paths for the activity, and the relationship
58      * between the conditions.</p>
59      */
ConditionHasBeenSet()60     inline bool ConditionHasBeenSet() const { return m_conditionHasBeenSet; }
61 
62     /**
63      * <p>The conditions that define the paths for the activity, and the relationship
64      * between the conditions.</p>
65      */
SetCondition(const Condition & value)66     inline void SetCondition(const Condition& value) { m_conditionHasBeenSet = true; m_condition = value; }
67 
68     /**
69      * <p>The conditions that define the paths for the activity, and the relationship
70      * between the conditions.</p>
71      */
SetCondition(Condition && value)72     inline void SetCondition(Condition&& value) { m_conditionHasBeenSet = true; m_condition = std::move(value); }
73 
74     /**
75      * <p>The conditions that define the paths for the activity, and the relationship
76      * between the conditions.</p>
77      */
WithCondition(const Condition & value)78     inline ConditionalSplitActivity& WithCondition(const Condition& value) { SetCondition(value); return *this;}
79 
80     /**
81      * <p>The conditions that define the paths for the activity, and the relationship
82      * between the conditions.</p>
83      */
WithCondition(Condition && value)84     inline ConditionalSplitActivity& WithCondition(Condition&& value) { SetCondition(std::move(value)); return *this;}
85 
86 
87     /**
88      * <p>The amount of time to wait before determining whether the conditions are met,
89      * or the date and time when Amazon Pinpoint determines whether the conditions are
90      * met.</p>
91      */
GetEvaluationWaitTime()92     inline const WaitTime& GetEvaluationWaitTime() const{ return m_evaluationWaitTime; }
93 
94     /**
95      * <p>The amount of time to wait before determining whether the conditions are met,
96      * or the date and time when Amazon Pinpoint determines whether the conditions are
97      * met.</p>
98      */
EvaluationWaitTimeHasBeenSet()99     inline bool EvaluationWaitTimeHasBeenSet() const { return m_evaluationWaitTimeHasBeenSet; }
100 
101     /**
102      * <p>The amount of time to wait before determining whether the conditions are met,
103      * or the date and time when Amazon Pinpoint determines whether the conditions are
104      * met.</p>
105      */
SetEvaluationWaitTime(const WaitTime & value)106     inline void SetEvaluationWaitTime(const WaitTime& value) { m_evaluationWaitTimeHasBeenSet = true; m_evaluationWaitTime = value; }
107 
108     /**
109      * <p>The amount of time to wait before determining whether the conditions are met,
110      * or the date and time when Amazon Pinpoint determines whether the conditions are
111      * met.</p>
112      */
SetEvaluationWaitTime(WaitTime && value)113     inline void SetEvaluationWaitTime(WaitTime&& value) { m_evaluationWaitTimeHasBeenSet = true; m_evaluationWaitTime = std::move(value); }
114 
115     /**
116      * <p>The amount of time to wait before determining whether the conditions are met,
117      * or the date and time when Amazon Pinpoint determines whether the conditions are
118      * met.</p>
119      */
WithEvaluationWaitTime(const WaitTime & value)120     inline ConditionalSplitActivity& WithEvaluationWaitTime(const WaitTime& value) { SetEvaluationWaitTime(value); return *this;}
121 
122     /**
123      * <p>The amount of time to wait before determining whether the conditions are met,
124      * or the date and time when Amazon Pinpoint determines whether the conditions are
125      * met.</p>
126      */
WithEvaluationWaitTime(WaitTime && value)127     inline ConditionalSplitActivity& WithEvaluationWaitTime(WaitTime&& value) { SetEvaluationWaitTime(std::move(value)); return *this;}
128 
129 
130     /**
131      * <p>The unique identifier for the activity to perform if the conditions aren't
132      * met.</p>
133      */
GetFalseActivity()134     inline const Aws::String& GetFalseActivity() const{ return m_falseActivity; }
135 
136     /**
137      * <p>The unique identifier for the activity to perform if the conditions aren't
138      * met.</p>
139      */
FalseActivityHasBeenSet()140     inline bool FalseActivityHasBeenSet() const { return m_falseActivityHasBeenSet; }
141 
142     /**
143      * <p>The unique identifier for the activity to perform if the conditions aren't
144      * met.</p>
145      */
SetFalseActivity(const Aws::String & value)146     inline void SetFalseActivity(const Aws::String& value) { m_falseActivityHasBeenSet = true; m_falseActivity = value; }
147 
148     /**
149      * <p>The unique identifier for the activity to perform if the conditions aren't
150      * met.</p>
151      */
SetFalseActivity(Aws::String && value)152     inline void SetFalseActivity(Aws::String&& value) { m_falseActivityHasBeenSet = true; m_falseActivity = std::move(value); }
153 
154     /**
155      * <p>The unique identifier for the activity to perform if the conditions aren't
156      * met.</p>
157      */
SetFalseActivity(const char * value)158     inline void SetFalseActivity(const char* value) { m_falseActivityHasBeenSet = true; m_falseActivity.assign(value); }
159 
160     /**
161      * <p>The unique identifier for the activity to perform if the conditions aren't
162      * met.</p>
163      */
WithFalseActivity(const Aws::String & value)164     inline ConditionalSplitActivity& WithFalseActivity(const Aws::String& value) { SetFalseActivity(value); return *this;}
165 
166     /**
167      * <p>The unique identifier for the activity to perform if the conditions aren't
168      * met.</p>
169      */
WithFalseActivity(Aws::String && value)170     inline ConditionalSplitActivity& WithFalseActivity(Aws::String&& value) { SetFalseActivity(std::move(value)); return *this;}
171 
172     /**
173      * <p>The unique identifier for the activity to perform if the conditions aren't
174      * met.</p>
175      */
WithFalseActivity(const char * value)176     inline ConditionalSplitActivity& WithFalseActivity(const char* value) { SetFalseActivity(value); return *this;}
177 
178 
179     /**
180      * <p>The unique identifier for the activity to perform if the conditions are
181      * met.</p>
182      */
GetTrueActivity()183     inline const Aws::String& GetTrueActivity() const{ return m_trueActivity; }
184 
185     /**
186      * <p>The unique identifier for the activity to perform if the conditions are
187      * met.</p>
188      */
TrueActivityHasBeenSet()189     inline bool TrueActivityHasBeenSet() const { return m_trueActivityHasBeenSet; }
190 
191     /**
192      * <p>The unique identifier for the activity to perform if the conditions are
193      * met.</p>
194      */
SetTrueActivity(const Aws::String & value)195     inline void SetTrueActivity(const Aws::String& value) { m_trueActivityHasBeenSet = true; m_trueActivity = value; }
196 
197     /**
198      * <p>The unique identifier for the activity to perform if the conditions are
199      * met.</p>
200      */
SetTrueActivity(Aws::String && value)201     inline void SetTrueActivity(Aws::String&& value) { m_trueActivityHasBeenSet = true; m_trueActivity = std::move(value); }
202 
203     /**
204      * <p>The unique identifier for the activity to perform if the conditions are
205      * met.</p>
206      */
SetTrueActivity(const char * value)207     inline void SetTrueActivity(const char* value) { m_trueActivityHasBeenSet = true; m_trueActivity.assign(value); }
208 
209     /**
210      * <p>The unique identifier for the activity to perform if the conditions are
211      * met.</p>
212      */
WithTrueActivity(const Aws::String & value)213     inline ConditionalSplitActivity& WithTrueActivity(const Aws::String& value) { SetTrueActivity(value); return *this;}
214 
215     /**
216      * <p>The unique identifier for the activity to perform if the conditions are
217      * met.</p>
218      */
WithTrueActivity(Aws::String && value)219     inline ConditionalSplitActivity& WithTrueActivity(Aws::String&& value) { SetTrueActivity(std::move(value)); return *this;}
220 
221     /**
222      * <p>The unique identifier for the activity to perform if the conditions are
223      * met.</p>
224      */
WithTrueActivity(const char * value)225     inline ConditionalSplitActivity& WithTrueActivity(const char* value) { SetTrueActivity(value); return *this;}
226 
227   private:
228 
229     Condition m_condition;
230     bool m_conditionHasBeenSet;
231 
232     WaitTime m_evaluationWaitTime;
233     bool m_evaluationWaitTimeHasBeenSet;
234 
235     Aws::String m_falseActivity;
236     bool m_falseActivityHasBeenSet;
237 
238     Aws::String m_trueActivity;
239     bool m_trueActivityHasBeenSet;
240   };
241 
242 } // namespace Model
243 } // namespace Pinpoint
244 } // namespace Aws
245