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

An object that represents the action to take if a match is * determined.

See Also:

AWS * API Reference

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

An object that represents the targets that traffic is routed to when a * request matches the route.

*/ inline const Aws::Vector& GetWeightedTargets() const{ return m_weightedTargets; } /** *

An object that represents the targets that traffic is routed to when a * request matches the route.

*/ inline bool WeightedTargetsHasBeenSet() const { return m_weightedTargetsHasBeenSet; } /** *

An object that represents the targets that traffic is routed to when a * request matches the route.

*/ inline void SetWeightedTargets(const Aws::Vector& value) { m_weightedTargetsHasBeenSet = true; m_weightedTargets = value; } /** *

An object that represents the targets that traffic is routed to when a * request matches the route.

*/ inline void SetWeightedTargets(Aws::Vector&& value) { m_weightedTargetsHasBeenSet = true; m_weightedTargets = std::move(value); } /** *

An object that represents the targets that traffic is routed to when a * request matches the route.

*/ inline GrpcRouteAction& WithWeightedTargets(const Aws::Vector& value) { SetWeightedTargets(value); return *this;} /** *

An object that represents the targets that traffic is routed to when a * request matches the route.

*/ inline GrpcRouteAction& WithWeightedTargets(Aws::Vector&& value) { SetWeightedTargets(std::move(value)); return *this;} /** *

An object that represents the targets that traffic is routed to when a * request matches the route.

*/ inline GrpcRouteAction& AddWeightedTargets(const WeightedTarget& value) { m_weightedTargetsHasBeenSet = true; m_weightedTargets.push_back(value); return *this; } /** *

An object that represents the targets that traffic is routed to when a * request matches the route.

*/ inline GrpcRouteAction& AddWeightedTargets(WeightedTarget&& value) { m_weightedTargetsHasBeenSet = true; m_weightedTargets.push_back(std::move(value)); return *this; } private: Aws::Vector m_weightedTargets; bool m_weightedTargetsHasBeenSet = false; }; } // namespace Model } // namespace AppMesh } // namespace Aws