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/codedeploy/CodeDeploy_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSVector.h>
9 #include <aws/codedeploy/model/TrafficRoute.h>
10 #include <aws/codedeploy/model/TargetGroupInfo.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 CodeDeploy
24 {
25 namespace Model
26 {
27 
28   /**
29    * <p> Information about two target groups and how traffic is routed during an
30    * Amazon ECS deployment. An optional test traffic route can be specified.
31    * </p><p><h3>See Also:</h3>   <a
32    * href="http://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/TargetGroupPairInfo">AWS
33    * API Reference</a></p>
34    */
35   class AWS_CODEDEPLOY_API TargetGroupPairInfo
36   {
37   public:
38     TargetGroupPairInfo();
39     TargetGroupPairInfo(Aws::Utils::Json::JsonView jsonValue);
40     TargetGroupPairInfo& operator=(Aws::Utils::Json::JsonView jsonValue);
41     Aws::Utils::Json::JsonValue Jsonize() const;
42 
43 
44     /**
45      * <p> One pair of target groups. One is associated with the original task set. The
46      * second is associated with the task set that serves traffic after the deployment
47      * is complete. </p>
48      */
GetTargetGroups()49     inline const Aws::Vector<TargetGroupInfo>& GetTargetGroups() const{ return m_targetGroups; }
50 
51     /**
52      * <p> One pair of target groups. One is associated with the original task set. The
53      * second is associated with the task set that serves traffic after the deployment
54      * is complete. </p>
55      */
TargetGroupsHasBeenSet()56     inline bool TargetGroupsHasBeenSet() const { return m_targetGroupsHasBeenSet; }
57 
58     /**
59      * <p> One pair of target groups. One is associated with the original task set. The
60      * second is associated with the task set that serves traffic after the deployment
61      * is complete. </p>
62      */
SetTargetGroups(const Aws::Vector<TargetGroupInfo> & value)63     inline void SetTargetGroups(const Aws::Vector<TargetGroupInfo>& value) { m_targetGroupsHasBeenSet = true; m_targetGroups = value; }
64 
65     /**
66      * <p> One pair of target groups. One is associated with the original task set. The
67      * second is associated with the task set that serves traffic after the deployment
68      * is complete. </p>
69      */
SetTargetGroups(Aws::Vector<TargetGroupInfo> && value)70     inline void SetTargetGroups(Aws::Vector<TargetGroupInfo>&& value) { m_targetGroupsHasBeenSet = true; m_targetGroups = std::move(value); }
71 
72     /**
73      * <p> One pair of target groups. One is associated with the original task set. The
74      * second is associated with the task set that serves traffic after the deployment
75      * is complete. </p>
76      */
WithTargetGroups(const Aws::Vector<TargetGroupInfo> & value)77     inline TargetGroupPairInfo& WithTargetGroups(const Aws::Vector<TargetGroupInfo>& value) { SetTargetGroups(value); return *this;}
78 
79     /**
80      * <p> One pair of target groups. One is associated with the original task set. The
81      * second is associated with the task set that serves traffic after the deployment
82      * is complete. </p>
83      */
WithTargetGroups(Aws::Vector<TargetGroupInfo> && value)84     inline TargetGroupPairInfo& WithTargetGroups(Aws::Vector<TargetGroupInfo>&& value) { SetTargetGroups(std::move(value)); return *this;}
85 
86     /**
87      * <p> One pair of target groups. One is associated with the original task set. The
88      * second is associated with the task set that serves traffic after the deployment
89      * is complete. </p>
90      */
AddTargetGroups(const TargetGroupInfo & value)91     inline TargetGroupPairInfo& AddTargetGroups(const TargetGroupInfo& value) { m_targetGroupsHasBeenSet = true; m_targetGroups.push_back(value); return *this; }
92 
93     /**
94      * <p> One pair of target groups. One is associated with the original task set. The
95      * second is associated with the task set that serves traffic after the deployment
96      * is complete. </p>
97      */
AddTargetGroups(TargetGroupInfo && value)98     inline TargetGroupPairInfo& AddTargetGroups(TargetGroupInfo&& value) { m_targetGroupsHasBeenSet = true; m_targetGroups.push_back(std::move(value)); return *this; }
99 
100 
101     /**
102      * <p> The path used by a load balancer to route production traffic when an Amazon
103      * ECS deployment is complete. </p>
104      */
GetProdTrafficRoute()105     inline const TrafficRoute& GetProdTrafficRoute() const{ return m_prodTrafficRoute; }
106 
107     /**
108      * <p> The path used by a load balancer to route production traffic when an Amazon
109      * ECS deployment is complete. </p>
110      */
ProdTrafficRouteHasBeenSet()111     inline bool ProdTrafficRouteHasBeenSet() const { return m_prodTrafficRouteHasBeenSet; }
112 
113     /**
114      * <p> The path used by a load balancer to route production traffic when an Amazon
115      * ECS deployment is complete. </p>
116      */
SetProdTrafficRoute(const TrafficRoute & value)117     inline void SetProdTrafficRoute(const TrafficRoute& value) { m_prodTrafficRouteHasBeenSet = true; m_prodTrafficRoute = value; }
118 
119     /**
120      * <p> The path used by a load balancer to route production traffic when an Amazon
121      * ECS deployment is complete. </p>
122      */
SetProdTrafficRoute(TrafficRoute && value)123     inline void SetProdTrafficRoute(TrafficRoute&& value) { m_prodTrafficRouteHasBeenSet = true; m_prodTrafficRoute = std::move(value); }
124 
125     /**
126      * <p> The path used by a load balancer to route production traffic when an Amazon
127      * ECS deployment is complete. </p>
128      */
WithProdTrafficRoute(const TrafficRoute & value)129     inline TargetGroupPairInfo& WithProdTrafficRoute(const TrafficRoute& value) { SetProdTrafficRoute(value); return *this;}
130 
131     /**
132      * <p> The path used by a load balancer to route production traffic when an Amazon
133      * ECS deployment is complete. </p>
134      */
WithProdTrafficRoute(TrafficRoute && value)135     inline TargetGroupPairInfo& WithProdTrafficRoute(TrafficRoute&& value) { SetProdTrafficRoute(std::move(value)); return *this;}
136 
137 
138     /**
139      * <p> An optional path used by a load balancer to route test traffic after an
140      * Amazon ECS deployment. Validation can occur while test traffic is served during
141      * a deployment. </p>
142      */
GetTestTrafficRoute()143     inline const TrafficRoute& GetTestTrafficRoute() const{ return m_testTrafficRoute; }
144 
145     /**
146      * <p> An optional path used by a load balancer to route test traffic after an
147      * Amazon ECS deployment. Validation can occur while test traffic is served during
148      * a deployment. </p>
149      */
TestTrafficRouteHasBeenSet()150     inline bool TestTrafficRouteHasBeenSet() const { return m_testTrafficRouteHasBeenSet; }
151 
152     /**
153      * <p> An optional path used by a load balancer to route test traffic after an
154      * Amazon ECS deployment. Validation can occur while test traffic is served during
155      * a deployment. </p>
156      */
SetTestTrafficRoute(const TrafficRoute & value)157     inline void SetTestTrafficRoute(const TrafficRoute& value) { m_testTrafficRouteHasBeenSet = true; m_testTrafficRoute = value; }
158 
159     /**
160      * <p> An optional path used by a load balancer to route test traffic after an
161      * Amazon ECS deployment. Validation can occur while test traffic is served during
162      * a deployment. </p>
163      */
SetTestTrafficRoute(TrafficRoute && value)164     inline void SetTestTrafficRoute(TrafficRoute&& value) { m_testTrafficRouteHasBeenSet = true; m_testTrafficRoute = std::move(value); }
165 
166     /**
167      * <p> An optional path used by a load balancer to route test traffic after an
168      * Amazon ECS deployment. Validation can occur while test traffic is served during
169      * a deployment. </p>
170      */
WithTestTrafficRoute(const TrafficRoute & value)171     inline TargetGroupPairInfo& WithTestTrafficRoute(const TrafficRoute& value) { SetTestTrafficRoute(value); return *this;}
172 
173     /**
174      * <p> An optional path used by a load balancer to route test traffic after an
175      * Amazon ECS deployment. Validation can occur while test traffic is served during
176      * a deployment. </p>
177      */
WithTestTrafficRoute(TrafficRoute && value)178     inline TargetGroupPairInfo& WithTestTrafficRoute(TrafficRoute&& value) { SetTestTrafficRoute(std::move(value)); return *this;}
179 
180   private:
181 
182     Aws::Vector<TargetGroupInfo> m_targetGroups;
183     bool m_targetGroupsHasBeenSet;
184 
185     TrafficRoute m_prodTrafficRoute;
186     bool m_prodTrafficRouteHasBeenSet;
187 
188     TrafficRoute m_testTrafficRoute;
189     bool m_testTrafficRouteHasBeenSet;
190   };
191 
192 } // namespace Model
193 } // namespace CodeDeploy
194 } // namespace Aws
195