/** * 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 AppMesh { namespace Model { /** *

An object that represents a route specification. Specify one route * type.

See Also:

AWS * API Reference

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

An object that represents the specification of a gRPC route.

*/ inline const GrpcRoute& GetGrpcRoute() const{ return m_grpcRoute; } /** *

An object that represents the specification of a gRPC route.

*/ inline bool GrpcRouteHasBeenSet() const { return m_grpcRouteHasBeenSet; } /** *

An object that represents the specification of a gRPC route.

*/ inline void SetGrpcRoute(const GrpcRoute& value) { m_grpcRouteHasBeenSet = true; m_grpcRoute = value; } /** *

An object that represents the specification of a gRPC route.

*/ inline void SetGrpcRoute(GrpcRoute&& value) { m_grpcRouteHasBeenSet = true; m_grpcRoute = std::move(value); } /** *

An object that represents the specification of a gRPC route.

*/ inline RouteSpec& WithGrpcRoute(const GrpcRoute& value) { SetGrpcRoute(value); return *this;} /** *

An object that represents the specification of a gRPC route.

*/ inline RouteSpec& WithGrpcRoute(GrpcRoute&& value) { SetGrpcRoute(std::move(value)); return *this;} /** *

An object that represents the specification of an HTTP/2 route.

*/ inline const HttpRoute& GetHttp2Route() const{ return m_http2Route; } /** *

An object that represents the specification of an HTTP/2 route.

*/ inline bool Http2RouteHasBeenSet() const { return m_http2RouteHasBeenSet; } /** *

An object that represents the specification of an HTTP/2 route.

*/ inline void SetHttp2Route(const HttpRoute& value) { m_http2RouteHasBeenSet = true; m_http2Route = value; } /** *

An object that represents the specification of an HTTP/2 route.

*/ inline void SetHttp2Route(HttpRoute&& value) { m_http2RouteHasBeenSet = true; m_http2Route = std::move(value); } /** *

An object that represents the specification of an HTTP/2 route.

*/ inline RouteSpec& WithHttp2Route(const HttpRoute& value) { SetHttp2Route(value); return *this;} /** *

An object that represents the specification of an HTTP/2 route.

*/ inline RouteSpec& WithHttp2Route(HttpRoute&& value) { SetHttp2Route(std::move(value)); return *this;} /** *

An object that represents the specification of an HTTP route.

*/ inline const HttpRoute& GetHttpRoute() const{ return m_httpRoute; } /** *

An object that represents the specification of an HTTP route.

*/ inline bool HttpRouteHasBeenSet() const { return m_httpRouteHasBeenSet; } /** *

An object that represents the specification of an HTTP route.

*/ inline void SetHttpRoute(const HttpRoute& value) { m_httpRouteHasBeenSet = true; m_httpRoute = value; } /** *

An object that represents the specification of an HTTP route.

*/ inline void SetHttpRoute(HttpRoute&& value) { m_httpRouteHasBeenSet = true; m_httpRoute = std::move(value); } /** *

An object that represents the specification of an HTTP route.

*/ inline RouteSpec& WithHttpRoute(const HttpRoute& value) { SetHttpRoute(value); return *this;} /** *

An object that represents the specification of an HTTP route.

*/ inline RouteSpec& WithHttpRoute(HttpRoute&& value) { SetHttpRoute(std::move(value)); return *this;} /** *

The priority for the route. Routes are matched based on the specified value, * where 0 is the highest priority.

*/ inline int GetPriority() const{ return m_priority; } /** *

The priority for the route. Routes are matched based on the specified value, * where 0 is the highest priority.

*/ inline bool PriorityHasBeenSet() const { return m_priorityHasBeenSet; } /** *

The priority for the route. Routes are matched based on the specified value, * where 0 is the highest priority.

*/ inline void SetPriority(int value) { m_priorityHasBeenSet = true; m_priority = value; } /** *

The priority for the route. Routes are matched based on the specified value, * where 0 is the highest priority.

*/ inline RouteSpec& WithPriority(int value) { SetPriority(value); return *this;} /** *

An object that represents the specification of a TCP route.

*/ inline const TcpRoute& GetTcpRoute() const{ return m_tcpRoute; } /** *

An object that represents the specification of a TCP route.

*/ inline bool TcpRouteHasBeenSet() const { return m_tcpRouteHasBeenSet; } /** *

An object that represents the specification of a TCP route.

*/ inline void SetTcpRoute(const TcpRoute& value) { m_tcpRouteHasBeenSet = true; m_tcpRoute = value; } /** *

An object that represents the specification of a TCP route.

*/ inline void SetTcpRoute(TcpRoute&& value) { m_tcpRouteHasBeenSet = true; m_tcpRoute = std::move(value); } /** *

An object that represents the specification of a TCP route.

*/ inline RouteSpec& WithTcpRoute(const TcpRoute& value) { SetTcpRoute(value); return *this;} /** *

An object that represents the specification of a TCP route.

*/ inline RouteSpec& WithTcpRoute(TcpRoute&& value) { SetTcpRoute(std::move(value)); return *this;} private: GrpcRoute m_grpcRoute; bool m_grpcRouteHasBeenSet = false; HttpRoute m_http2Route; bool m_http2RouteHasBeenSet = false; HttpRoute m_httpRoute; bool m_httpRouteHasBeenSet = false; int m_priority; bool m_priorityHasBeenSet = false; TcpRoute m_tcpRoute; bool m_tcpRouteHasBeenSet = false; }; } // namespace Model } // namespace AppMesh } // namespace Aws