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/ssm-contacts/SSMContacts_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSVector.h>
9 #include <aws/ssm-contacts/model/Target.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 SSMContacts
23 {
24 namespace Model
25 {
26 
27   /**
28    * <p>A set amount of time that an escalation plan or engagement plan engages the
29    * specified contacts or contact methods.</p><p><h3>See Also:</h3>   <a
30    * href="http://docs.aws.amazon.com/goto/WebAPI/ssm-contacts-2021-05-03/Stage">AWS
31    * API Reference</a></p>
32    */
33   class AWS_SSMCONTACTS_API Stage
34   {
35   public:
36     Stage();
37     Stage(Aws::Utils::Json::JsonView jsonValue);
38     Stage& operator=(Aws::Utils::Json::JsonView jsonValue);
39     Aws::Utils::Json::JsonValue Jsonize() const;
40 
41 
42     /**
43      * <p>The time to wait until beginning the next stage. The duration can only be set
44      * to 0 if a target is specified.</p>
45      */
GetDurationInMinutes()46     inline int GetDurationInMinutes() const{ return m_durationInMinutes; }
47 
48     /**
49      * <p>The time to wait until beginning the next stage. The duration can only be set
50      * to 0 if a target is specified.</p>
51      */
DurationInMinutesHasBeenSet()52     inline bool DurationInMinutesHasBeenSet() const { return m_durationInMinutesHasBeenSet; }
53 
54     /**
55      * <p>The time to wait until beginning the next stage. The duration can only be set
56      * to 0 if a target is specified.</p>
57      */
SetDurationInMinutes(int value)58     inline void SetDurationInMinutes(int value) { m_durationInMinutesHasBeenSet = true; m_durationInMinutes = value; }
59 
60     /**
61      * <p>The time to wait until beginning the next stage. The duration can only be set
62      * to 0 if a target is specified.</p>
63      */
WithDurationInMinutes(int value)64     inline Stage& WithDurationInMinutes(int value) { SetDurationInMinutes(value); return *this;}
65 
66 
67     /**
68      * <p>The contacts or contact methods that the escalation plan or engagement plan
69      * is engaging.</p>
70      */
GetTargets()71     inline const Aws::Vector<Target>& GetTargets() const{ return m_targets; }
72 
73     /**
74      * <p>The contacts or contact methods that the escalation plan or engagement plan
75      * is engaging.</p>
76      */
TargetsHasBeenSet()77     inline bool TargetsHasBeenSet() const { return m_targetsHasBeenSet; }
78 
79     /**
80      * <p>The contacts or contact methods that the escalation plan or engagement plan
81      * is engaging.</p>
82      */
SetTargets(const Aws::Vector<Target> & value)83     inline void SetTargets(const Aws::Vector<Target>& value) { m_targetsHasBeenSet = true; m_targets = value; }
84 
85     /**
86      * <p>The contacts or contact methods that the escalation plan or engagement plan
87      * is engaging.</p>
88      */
SetTargets(Aws::Vector<Target> && value)89     inline void SetTargets(Aws::Vector<Target>&& value) { m_targetsHasBeenSet = true; m_targets = std::move(value); }
90 
91     /**
92      * <p>The contacts or contact methods that the escalation plan or engagement plan
93      * is engaging.</p>
94      */
WithTargets(const Aws::Vector<Target> & value)95     inline Stage& WithTargets(const Aws::Vector<Target>& value) { SetTargets(value); return *this;}
96 
97     /**
98      * <p>The contacts or contact methods that the escalation plan or engagement plan
99      * is engaging.</p>
100      */
WithTargets(Aws::Vector<Target> && value)101     inline Stage& WithTargets(Aws::Vector<Target>&& value) { SetTargets(std::move(value)); return *this;}
102 
103     /**
104      * <p>The contacts or contact methods that the escalation plan or engagement plan
105      * is engaging.</p>
106      */
AddTargets(const Target & value)107     inline Stage& AddTargets(const Target& value) { m_targetsHasBeenSet = true; m_targets.push_back(value); return *this; }
108 
109     /**
110      * <p>The contacts or contact methods that the escalation plan or engagement plan
111      * is engaging.</p>
112      */
AddTargets(Target && value)113     inline Stage& AddTargets(Target&& value) { m_targetsHasBeenSet = true; m_targets.push_back(std::move(value)); return *this; }
114 
115   private:
116 
117     int m_durationInMinutes;
118     bool m_durationInMinutesHasBeenSet;
119 
120     Aws::Vector<Target> m_targets;
121     bool m_targetsHasBeenSet;
122   };
123 
124 } // namespace Model
125 } // namespace SSMContacts
126 } // namespace Aws
127