/** * 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 GrpcGatewayRouteAction { public: AWS_APPMESH_API GrpcGatewayRouteAction(); AWS_APPMESH_API GrpcGatewayRouteAction(Aws::Utils::Json::JsonView jsonValue); AWS_APPMESH_API GrpcGatewayRouteAction& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_APPMESH_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The gateway route action to rewrite.

*/ inline const GrpcGatewayRouteRewrite& GetRewrite() const{ return m_rewrite; } /** *

The gateway route action to rewrite.

*/ inline bool RewriteHasBeenSet() const { return m_rewriteHasBeenSet; } /** *

The gateway route action to rewrite.

*/ inline void SetRewrite(const GrpcGatewayRouteRewrite& value) { m_rewriteHasBeenSet = true; m_rewrite = value; } /** *

The gateway route action to rewrite.

*/ inline void SetRewrite(GrpcGatewayRouteRewrite&& value) { m_rewriteHasBeenSet = true; m_rewrite = std::move(value); } /** *

The gateway route action to rewrite.

*/ inline GrpcGatewayRouteAction& WithRewrite(const GrpcGatewayRouteRewrite& value) { SetRewrite(value); return *this;} /** *

The gateway route action to rewrite.

*/ inline GrpcGatewayRouteAction& WithRewrite(GrpcGatewayRouteRewrite&& value) { SetRewrite(std::move(value)); return *this;} /** *

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

*/ inline const GatewayRouteTarget& GetTarget() const{ return m_target; } /** *

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

*/ inline bool TargetHasBeenSet() const { return m_targetHasBeenSet; } /** *

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

*/ inline void SetTarget(const GatewayRouteTarget& value) { m_targetHasBeenSet = true; m_target = value; } /** *

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

*/ inline void SetTarget(GatewayRouteTarget&& value) { m_targetHasBeenSet = true; m_target = std::move(value); } /** *

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

*/ inline GrpcGatewayRouteAction& WithTarget(const GatewayRouteTarget& value) { SetTarget(value); return *this;} /** *

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

*/ inline GrpcGatewayRouteAction& WithTarget(GatewayRouteTarget&& value) { SetTarget(std::move(value)); return *this;} private: GrpcGatewayRouteRewrite m_rewrite; bool m_rewriteHasBeenSet = false; GatewayRouteTarget m_target; bool m_targetHasBeenSet = false; }; } // namespace Model } // namespace AppMesh } // namespace Aws