/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #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 the requirements for a route to match HTTP requests * for a virtual router.

See Also:

AWS * API Reference

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

An object that represents the client request headers to match on.

*/ inline const Aws::Vector& GetHeaders() const{ return m_headers; } /** *

An object that represents the client request headers to match on.

*/ inline bool HeadersHasBeenSet() const { return m_headersHasBeenSet; } /** *

An object that represents the client request headers to match on.

*/ inline void SetHeaders(const Aws::Vector& value) { m_headersHasBeenSet = true; m_headers = value; } /** *

An object that represents the client request headers to match on.

*/ inline void SetHeaders(Aws::Vector&& value) { m_headersHasBeenSet = true; m_headers = std::move(value); } /** *

An object that represents the client request headers to match on.

*/ inline HttpRouteMatch& WithHeaders(const Aws::Vector& value) { SetHeaders(value); return *this;} /** *

An object that represents the client request headers to match on.

*/ inline HttpRouteMatch& WithHeaders(Aws::Vector&& value) { SetHeaders(std::move(value)); return *this;} /** *

An object that represents the client request headers to match on.

*/ inline HttpRouteMatch& AddHeaders(const HttpRouteHeader& value) { m_headersHasBeenSet = true; m_headers.push_back(value); return *this; } /** *

An object that represents the client request headers to match on.

*/ inline HttpRouteMatch& AddHeaders(HttpRouteHeader&& value) { m_headersHasBeenSet = true; m_headers.push_back(std::move(value)); return *this; } /** *

The client request method to match on. Specify only one.

*/ inline const HttpMethod& GetMethod() const{ return m_method; } /** *

The client request method to match on. Specify only one.

*/ inline bool MethodHasBeenSet() const { return m_methodHasBeenSet; } /** *

The client request method to match on. Specify only one.

*/ inline void SetMethod(const HttpMethod& value) { m_methodHasBeenSet = true; m_method = value; } /** *

The client request method to match on. Specify only one.

*/ inline void SetMethod(HttpMethod&& value) { m_methodHasBeenSet = true; m_method = std::move(value); } /** *

The client request method to match on. Specify only one.

*/ inline HttpRouteMatch& WithMethod(const HttpMethod& value) { SetMethod(value); return *this;} /** *

The client request method to match on. Specify only one.

*/ inline HttpRouteMatch& WithMethod(HttpMethod&& value) { SetMethod(std::move(value)); return *this;} /** *

Specifies the path to match requests with. This parameter must always start * with /, which by itself matches all requests to the * virtual service name. You can also match for path-based routing of * requests. For example, if your virtual service name is * my-service.local and you want the route to match requests to * my-service.local/metrics, your prefix should be * /metrics.

*/ inline const Aws::String& GetPrefix() const{ return m_prefix; } /** *

Specifies the path to match requests with. This parameter must always start * with /, which by itself matches all requests to the * virtual service name. You can also match for path-based routing of * requests. For example, if your virtual service name is * my-service.local and you want the route to match requests to * my-service.local/metrics, your prefix should be * /metrics.

*/ inline bool PrefixHasBeenSet() const { return m_prefixHasBeenSet; } /** *

Specifies the path to match requests with. This parameter must always start * with /, which by itself matches all requests to the * virtual service name. You can also match for path-based routing of * requests. For example, if your virtual service name is * my-service.local and you want the route to match requests to * my-service.local/metrics, your prefix should be * /metrics.

*/ inline void SetPrefix(const Aws::String& value) { m_prefixHasBeenSet = true; m_prefix = value; } /** *

Specifies the path to match requests with. This parameter must always start * with /, which by itself matches all requests to the * virtual service name. You can also match for path-based routing of * requests. For example, if your virtual service name is * my-service.local and you want the route to match requests to * my-service.local/metrics, your prefix should be * /metrics.

*/ inline void SetPrefix(Aws::String&& value) { m_prefixHasBeenSet = true; m_prefix = std::move(value); } /** *

Specifies the path to match requests with. This parameter must always start * with /, which by itself matches all requests to the * virtual service name. You can also match for path-based routing of * requests. For example, if your virtual service name is * my-service.local and you want the route to match requests to * my-service.local/metrics, your prefix should be * /metrics.

*/ inline void SetPrefix(const char* value) { m_prefixHasBeenSet = true; m_prefix.assign(value); } /** *

Specifies the path to match requests with. This parameter must always start * with /, which by itself matches all requests to the * virtual service name. You can also match for path-based routing of * requests. For example, if your virtual service name is * my-service.local and you want the route to match requests to * my-service.local/metrics, your prefix should be * /metrics.

*/ inline HttpRouteMatch& WithPrefix(const Aws::String& value) { SetPrefix(value); return *this;} /** *

Specifies the path to match requests with. This parameter must always start * with /, which by itself matches all requests to the * virtual service name. You can also match for path-based routing of * requests. For example, if your virtual service name is * my-service.local and you want the route to match requests to * my-service.local/metrics, your prefix should be * /metrics.

*/ inline HttpRouteMatch& WithPrefix(Aws::String&& value) { SetPrefix(std::move(value)); return *this;} /** *

Specifies the path to match requests with. This parameter must always start * with /, which by itself matches all requests to the * virtual service name. You can also match for path-based routing of * requests. For example, if your virtual service name is * my-service.local and you want the route to match requests to * my-service.local/metrics, your prefix should be * /metrics.

*/ inline HttpRouteMatch& WithPrefix(const char* value) { SetPrefix(value); return *this;} /** *

The client request scheme to match on. Specify only one.

*/ inline const HttpScheme& GetScheme() const{ return m_scheme; } /** *

The client request scheme to match on. Specify only one.

*/ inline bool SchemeHasBeenSet() const { return m_schemeHasBeenSet; } /** *

The client request scheme to match on. Specify only one.

*/ inline void SetScheme(const HttpScheme& value) { m_schemeHasBeenSet = true; m_scheme = value; } /** *

The client request scheme to match on. Specify only one.

*/ inline void SetScheme(HttpScheme&& value) { m_schemeHasBeenSet = true; m_scheme = std::move(value); } /** *

The client request scheme to match on. Specify only one.

*/ inline HttpRouteMatch& WithScheme(const HttpScheme& value) { SetScheme(value); return *this;} /** *

The client request scheme to match on. Specify only one.

*/ inline HttpRouteMatch& WithScheme(HttpScheme&& value) { SetScheme(std::move(value)); return *this;} private: Aws::Vector m_headers; bool m_headersHasBeenSet; HttpMethod m_method; bool m_methodHasBeenSet; Aws::String m_prefix; bool m_prefixHasBeenSet; HttpScheme m_scheme; bool m_schemeHasBeenSet; }; } // namespace Model } // namespace AppMesh } // namespace Aws