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/AWSVector.h> 9 #include <aws/pinpoint/model/RandomSplitEntry.h> 10 #include <utility> 11 12 namespace Aws 13 { 14 namespace Utils 15 { 16 namespace Json 17 { 18 class JsonValue; 19 class JsonView; 20 } // namespace Json 21 } // namespace Utils 22 namespace Pinpoint 23 { 24 namespace Model 25 { 26 27 /** 28 * <p>Specifies the settings for a random split activity in a journey. This type of 29 * activity randomly sends specified percentages of participants down one of as 30 * many as five paths in a journey, based on conditions that you 31 * specify.</p><p><h3>See Also:</h3> <a 32 * href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/RandomSplitActivity">AWS 33 * API Reference</a></p> 34 */ 35 class AWS_PINPOINT_API RandomSplitActivity 36 { 37 public: 38 RandomSplitActivity(); 39 RandomSplitActivity(Aws::Utils::Json::JsonView jsonValue); 40 RandomSplitActivity& operator=(Aws::Utils::Json::JsonView jsonValue); 41 Aws::Utils::Json::JsonValue Jsonize() const; 42 43 44 /** 45 * <p>The paths for the activity, including the percentage of participants to enter 46 * each path and the activity to perform for each path.</p> 47 */ GetBranches()48 inline const Aws::Vector<RandomSplitEntry>& GetBranches() const{ return m_branches; } 49 50 /** 51 * <p>The paths for the activity, including the percentage of participants to enter 52 * each path and the activity to perform for each path.</p> 53 */ BranchesHasBeenSet()54 inline bool BranchesHasBeenSet() const { return m_branchesHasBeenSet; } 55 56 /** 57 * <p>The paths for the activity, including the percentage of participants to enter 58 * each path and the activity to perform for each path.</p> 59 */ SetBranches(const Aws::Vector<RandomSplitEntry> & value)60 inline void SetBranches(const Aws::Vector<RandomSplitEntry>& value) { m_branchesHasBeenSet = true; m_branches = value; } 61 62 /** 63 * <p>The paths for the activity, including the percentage of participants to enter 64 * each path and the activity to perform for each path.</p> 65 */ SetBranches(Aws::Vector<RandomSplitEntry> && value)66 inline void SetBranches(Aws::Vector<RandomSplitEntry>&& value) { m_branchesHasBeenSet = true; m_branches = std::move(value); } 67 68 /** 69 * <p>The paths for the activity, including the percentage of participants to enter 70 * each path and the activity to perform for each path.</p> 71 */ WithBranches(const Aws::Vector<RandomSplitEntry> & value)72 inline RandomSplitActivity& WithBranches(const Aws::Vector<RandomSplitEntry>& value) { SetBranches(value); return *this;} 73 74 /** 75 * <p>The paths for the activity, including the percentage of participants to enter 76 * each path and the activity to perform for each path.</p> 77 */ WithBranches(Aws::Vector<RandomSplitEntry> && value)78 inline RandomSplitActivity& WithBranches(Aws::Vector<RandomSplitEntry>&& value) { SetBranches(std::move(value)); return *this;} 79 80 /** 81 * <p>The paths for the activity, including the percentage of participants to enter 82 * each path and the activity to perform for each path.</p> 83 */ AddBranches(const RandomSplitEntry & value)84 inline RandomSplitActivity& AddBranches(const RandomSplitEntry& value) { m_branchesHasBeenSet = true; m_branches.push_back(value); return *this; } 85 86 /** 87 * <p>The paths for the activity, including the percentage of participants to enter 88 * each path and the activity to perform for each path.</p> 89 */ AddBranches(RandomSplitEntry && value)90 inline RandomSplitActivity& AddBranches(RandomSplitEntry&& value) { m_branchesHasBeenSet = true; m_branches.push_back(std::move(value)); return *this; } 91 92 private: 93 94 Aws::Vector<RandomSplitEntry> m_branches; 95 bool m_branchesHasBeenSet; 96 }; 97 98 } // namespace Model 99 } // namespace Pinpoint 100 } // namespace Aws 101