/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace CodeDeploy { namespace Model { /** *

Information about two target groups and how traffic is routed during an * Amazon ECS deployment. An optional test traffic route can be specified. *

See Also:

AWS * API Reference

*/ class TargetGroupPairInfo { public: AWS_CODEDEPLOY_API TargetGroupPairInfo(); AWS_CODEDEPLOY_API TargetGroupPairInfo(Aws::Utils::Json::JsonView jsonValue); AWS_CODEDEPLOY_API TargetGroupPairInfo& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_CODEDEPLOY_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

One pair of target groups. One is associated with the original task set. The * second is associated with the task set that serves traffic after the deployment * is complete.

*/ inline const Aws::Vector& GetTargetGroups() const{ return m_targetGroups; } /** *

One pair of target groups. One is associated with the original task set. The * second is associated with the task set that serves traffic after the deployment * is complete.

*/ inline bool TargetGroupsHasBeenSet() const { return m_targetGroupsHasBeenSet; } /** *

One pair of target groups. One is associated with the original task set. The * second is associated with the task set that serves traffic after the deployment * is complete.

*/ inline void SetTargetGroups(const Aws::Vector& value) { m_targetGroupsHasBeenSet = true; m_targetGroups = value; } /** *

One pair of target groups. One is associated with the original task set. The * second is associated with the task set that serves traffic after the deployment * is complete.

*/ inline void SetTargetGroups(Aws::Vector&& value) { m_targetGroupsHasBeenSet = true; m_targetGroups = std::move(value); } /** *

One pair of target groups. One is associated with the original task set. The * second is associated with the task set that serves traffic after the deployment * is complete.

*/ inline TargetGroupPairInfo& WithTargetGroups(const Aws::Vector& value) { SetTargetGroups(value); return *this;} /** *

One pair of target groups. One is associated with the original task set. The * second is associated with the task set that serves traffic after the deployment * is complete.

*/ inline TargetGroupPairInfo& WithTargetGroups(Aws::Vector&& value) { SetTargetGroups(std::move(value)); return *this;} /** *

One pair of target groups. One is associated with the original task set. The * second is associated with the task set that serves traffic after the deployment * is complete.

*/ inline TargetGroupPairInfo& AddTargetGroups(const TargetGroupInfo& value) { m_targetGroupsHasBeenSet = true; m_targetGroups.push_back(value); return *this; } /** *

One pair of target groups. One is associated with the original task set. The * second is associated with the task set that serves traffic after the deployment * is complete.

*/ inline TargetGroupPairInfo& AddTargetGroups(TargetGroupInfo&& value) { m_targetGroupsHasBeenSet = true; m_targetGroups.push_back(std::move(value)); return *this; } /** *

The path used by a load balancer to route production traffic when an Amazon * ECS deployment is complete.

*/ inline const TrafficRoute& GetProdTrafficRoute() const{ return m_prodTrafficRoute; } /** *

The path used by a load balancer to route production traffic when an Amazon * ECS deployment is complete.

*/ inline bool ProdTrafficRouteHasBeenSet() const { return m_prodTrafficRouteHasBeenSet; } /** *

The path used by a load balancer to route production traffic when an Amazon * ECS deployment is complete.

*/ inline void SetProdTrafficRoute(const TrafficRoute& value) { m_prodTrafficRouteHasBeenSet = true; m_prodTrafficRoute = value; } /** *

The path used by a load balancer to route production traffic when an Amazon * ECS deployment is complete.

*/ inline void SetProdTrafficRoute(TrafficRoute&& value) { m_prodTrafficRouteHasBeenSet = true; m_prodTrafficRoute = std::move(value); } /** *

The path used by a load balancer to route production traffic when an Amazon * ECS deployment is complete.

*/ inline TargetGroupPairInfo& WithProdTrafficRoute(const TrafficRoute& value) { SetProdTrafficRoute(value); return *this;} /** *

The path used by a load balancer to route production traffic when an Amazon * ECS deployment is complete.

*/ inline TargetGroupPairInfo& WithProdTrafficRoute(TrafficRoute&& value) { SetProdTrafficRoute(std::move(value)); return *this;} /** *

An optional path used by a load balancer to route test traffic after an * Amazon ECS deployment. Validation can occur while test traffic is served during * a deployment.

*/ inline const TrafficRoute& GetTestTrafficRoute() const{ return m_testTrafficRoute; } /** *

An optional path used by a load balancer to route test traffic after an * Amazon ECS deployment. Validation can occur while test traffic is served during * a deployment.

*/ inline bool TestTrafficRouteHasBeenSet() const { return m_testTrafficRouteHasBeenSet; } /** *

An optional path used by a load balancer to route test traffic after an * Amazon ECS deployment. Validation can occur while test traffic is served during * a deployment.

*/ inline void SetTestTrafficRoute(const TrafficRoute& value) { m_testTrafficRouteHasBeenSet = true; m_testTrafficRoute = value; } /** *

An optional path used by a load balancer to route test traffic after an * Amazon ECS deployment. Validation can occur while test traffic is served during * a deployment.

*/ inline void SetTestTrafficRoute(TrafficRoute&& value) { m_testTrafficRouteHasBeenSet = true; m_testTrafficRoute = std::move(value); } /** *

An optional path used by a load balancer to route test traffic after an * Amazon ECS deployment. Validation can occur while test traffic is served during * a deployment.

*/ inline TargetGroupPairInfo& WithTestTrafficRoute(const TrafficRoute& value) { SetTestTrafficRoute(value); return *this;} /** *

An optional path used by a load balancer to route test traffic after an * Amazon ECS deployment. Validation can occur while test traffic is served during * a deployment.

*/ inline TargetGroupPairInfo& WithTestTrafficRoute(TrafficRoute&& value) { SetTestTrafficRoute(std::move(value)); return *this;} private: Aws::Vector m_targetGroups; bool m_targetGroupsHasBeenSet = false; TrafficRoute m_prodTrafficRoute; bool m_prodTrafficRouteHasBeenSet = false; TrafficRoute m_testTrafficRoute; bool m_testTrafficRouteHasBeenSet = false; }; } // namespace Model } // namespace CodeDeploy } // namespace Aws