/** * 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 #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 criteria for determining a request * match.

See Also:

AWS * API Reference

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

The client request headers to match on.

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

The client request headers to match on.

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

The client request headers to match on.

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

The client request headers to match on.

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

The client request headers to match on.

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

The client request headers to match on.

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

The client request headers to match on.

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

The client request headers to match on.

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

The host name to match on.

*/ inline const GatewayRouteHostnameMatch& GetHostname() const{ return m_hostname; } /** *

The host name to match on.

*/ inline bool HostnameHasBeenSet() const { return m_hostnameHasBeenSet; } /** *

The host name to match on.

*/ inline void SetHostname(const GatewayRouteHostnameMatch& value) { m_hostnameHasBeenSet = true; m_hostname = value; } /** *

The host name to match on.

*/ inline void SetHostname(GatewayRouteHostnameMatch&& value) { m_hostnameHasBeenSet = true; m_hostname = std::move(value); } /** *

The host name to match on.

*/ inline HttpGatewayRouteMatch& WithHostname(const GatewayRouteHostnameMatch& value) { SetHostname(value); return *this;} /** *

The host name to match on.

*/ inline HttpGatewayRouteMatch& WithHostname(GatewayRouteHostnameMatch&& value) { SetHostname(std::move(value)); return *this;} /** *

The method to match on.

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

The method to match on.

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

The method to match on.

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

The method to match on.

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

The method to match on.

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

The method to match on.

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

The path to match on.

*/ inline const HttpPathMatch& GetPath() const{ return m_path; } /** *

The path to match on.

*/ inline bool PathHasBeenSet() const { return m_pathHasBeenSet; } /** *

The path to match on.

*/ inline void SetPath(const HttpPathMatch& value) { m_pathHasBeenSet = true; m_path = value; } /** *

The path to match on.

*/ inline void SetPath(HttpPathMatch&& value) { m_pathHasBeenSet = true; m_path = std::move(value); } /** *

The path to match on.

*/ inline HttpGatewayRouteMatch& WithPath(const HttpPathMatch& value) { SetPath(value); return *this;} /** *

The path to match on.

*/ inline HttpGatewayRouteMatch& WithPath(HttpPathMatch&& value) { SetPath(std::move(value)); return *this;} /** *

The port number to match on.

*/ inline int GetPort() const{ return m_port; } /** *

The port number to match on.

*/ inline bool PortHasBeenSet() const { return m_portHasBeenSet; } /** *

The port number to match on.

*/ inline void SetPort(int value) { m_portHasBeenSet = true; m_port = value; } /** *

The port number to match on.

*/ inline HttpGatewayRouteMatch& WithPort(int value) { SetPort(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 HttpGatewayRouteMatch& 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 HttpGatewayRouteMatch& 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 HttpGatewayRouteMatch& WithPrefix(const char* value) { SetPrefix(value); return *this;} /** *

The query parameter to match on.

*/ inline const Aws::Vector& GetQueryParameters() const{ return m_queryParameters; } /** *

The query parameter to match on.

*/ inline bool QueryParametersHasBeenSet() const { return m_queryParametersHasBeenSet; } /** *

The query parameter to match on.

*/ inline void SetQueryParameters(const Aws::Vector& value) { m_queryParametersHasBeenSet = true; m_queryParameters = value; } /** *

The query parameter to match on.

*/ inline void SetQueryParameters(Aws::Vector&& value) { m_queryParametersHasBeenSet = true; m_queryParameters = std::move(value); } /** *

The query parameter to match on.

*/ inline HttpGatewayRouteMatch& WithQueryParameters(const Aws::Vector& value) { SetQueryParameters(value); return *this;} /** *

The query parameter to match on.

*/ inline HttpGatewayRouteMatch& WithQueryParameters(Aws::Vector&& value) { SetQueryParameters(std::move(value)); return *this;} /** *

The query parameter to match on.

*/ inline HttpGatewayRouteMatch& AddQueryParameters(const HttpQueryParameter& value) { m_queryParametersHasBeenSet = true; m_queryParameters.push_back(value); return *this; } /** *

The query parameter to match on.

*/ inline HttpGatewayRouteMatch& AddQueryParameters(HttpQueryParameter&& value) { m_queryParametersHasBeenSet = true; m_queryParameters.push_back(std::move(value)); return *this; } private: Aws::Vector m_headers; bool m_headersHasBeenSet = false; GatewayRouteHostnameMatch m_hostname; bool m_hostnameHasBeenSet = false; HttpMethod m_method; bool m_methodHasBeenSet = false; HttpPathMatch m_path; bool m_pathHasBeenSet = false; int m_port; bool m_portHasBeenSet = false; Aws::String m_prefix; bool m_prefixHasBeenSet = false; Aws::Vector m_queryParameters; bool m_queryParametersHasBeenSet = false; }; } // namespace Model } // namespace AppMesh } // namespace Aws