1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #pragma once
7 #include <aws/appmesh/AppMesh_EXPORTS.h>
8 #include <aws/appmesh/model/HttpRouteAction.h>
9 #include <aws/appmesh/model/HttpRouteMatch.h>
10 #include <aws/appmesh/model/HttpRetryPolicy.h>
11 #include <aws/appmesh/model/HttpTimeout.h>
12 #include <utility>
13 
14 namespace Aws
15 {
16 namespace Utils
17 {
18 namespace Json
19 {
20   class JsonValue;
21   class JsonView;
22 } // namespace Json
23 } // namespace Utils
24 namespace AppMesh
25 {
26 namespace Model
27 {
28 
29   /**
30    * <p>An object that represents an HTTP or HTTP/2 route type.</p><p><h3>See
31    * Also:</h3>   <a
32    * href="http://docs.aws.amazon.com/goto/WebAPI/appmesh-2019-01-25/HttpRoute">AWS
33    * API Reference</a></p>
34    */
35   class AWS_APPMESH_API HttpRoute
36   {
37   public:
38     HttpRoute();
39     HttpRoute(Aws::Utils::Json::JsonView jsonValue);
40     HttpRoute& operator=(Aws::Utils::Json::JsonView jsonValue);
41     Aws::Utils::Json::JsonValue Jsonize() const;
42 
43 
44     /**
45      * <p>An object that represents the action to take if a match is determined.</p>
46      */
GetAction()47     inline const HttpRouteAction& GetAction() const{ return m_action; }
48 
49     /**
50      * <p>An object that represents the action to take if a match is determined.</p>
51      */
ActionHasBeenSet()52     inline bool ActionHasBeenSet() const { return m_actionHasBeenSet; }
53 
54     /**
55      * <p>An object that represents the action to take if a match is determined.</p>
56      */
SetAction(const HttpRouteAction & value)57     inline void SetAction(const HttpRouteAction& value) { m_actionHasBeenSet = true; m_action = value; }
58 
59     /**
60      * <p>An object that represents the action to take if a match is determined.</p>
61      */
SetAction(HttpRouteAction && value)62     inline void SetAction(HttpRouteAction&& value) { m_actionHasBeenSet = true; m_action = std::move(value); }
63 
64     /**
65      * <p>An object that represents the action to take if a match is determined.</p>
66      */
WithAction(const HttpRouteAction & value)67     inline HttpRoute& WithAction(const HttpRouteAction& value) { SetAction(value); return *this;}
68 
69     /**
70      * <p>An object that represents the action to take if a match is determined.</p>
71      */
WithAction(HttpRouteAction && value)72     inline HttpRoute& WithAction(HttpRouteAction&& value) { SetAction(std::move(value)); return *this;}
73 
74 
75     /**
76      * <p>An object that represents the criteria for determining a request match.</p>
77      */
GetMatch()78     inline const HttpRouteMatch& GetMatch() const{ return m_match; }
79 
80     /**
81      * <p>An object that represents the criteria for determining a request match.</p>
82      */
MatchHasBeenSet()83     inline bool MatchHasBeenSet() const { return m_matchHasBeenSet; }
84 
85     /**
86      * <p>An object that represents the criteria for determining a request match.</p>
87      */
SetMatch(const HttpRouteMatch & value)88     inline void SetMatch(const HttpRouteMatch& value) { m_matchHasBeenSet = true; m_match = value; }
89 
90     /**
91      * <p>An object that represents the criteria for determining a request match.</p>
92      */
SetMatch(HttpRouteMatch && value)93     inline void SetMatch(HttpRouteMatch&& value) { m_matchHasBeenSet = true; m_match = std::move(value); }
94 
95     /**
96      * <p>An object that represents the criteria for determining a request match.</p>
97      */
WithMatch(const HttpRouteMatch & value)98     inline HttpRoute& WithMatch(const HttpRouteMatch& value) { SetMatch(value); return *this;}
99 
100     /**
101      * <p>An object that represents the criteria for determining a request match.</p>
102      */
WithMatch(HttpRouteMatch && value)103     inline HttpRoute& WithMatch(HttpRouteMatch&& value) { SetMatch(std::move(value)); return *this;}
104 
105 
106     /**
107      * <p>An object that represents a retry policy.</p>
108      */
GetRetryPolicy()109     inline const HttpRetryPolicy& GetRetryPolicy() const{ return m_retryPolicy; }
110 
111     /**
112      * <p>An object that represents a retry policy.</p>
113      */
RetryPolicyHasBeenSet()114     inline bool RetryPolicyHasBeenSet() const { return m_retryPolicyHasBeenSet; }
115 
116     /**
117      * <p>An object that represents a retry policy.</p>
118      */
SetRetryPolicy(const HttpRetryPolicy & value)119     inline void SetRetryPolicy(const HttpRetryPolicy& value) { m_retryPolicyHasBeenSet = true; m_retryPolicy = value; }
120 
121     /**
122      * <p>An object that represents a retry policy.</p>
123      */
SetRetryPolicy(HttpRetryPolicy && value)124     inline void SetRetryPolicy(HttpRetryPolicy&& value) { m_retryPolicyHasBeenSet = true; m_retryPolicy = std::move(value); }
125 
126     /**
127      * <p>An object that represents a retry policy.</p>
128      */
WithRetryPolicy(const HttpRetryPolicy & value)129     inline HttpRoute& WithRetryPolicy(const HttpRetryPolicy& value) { SetRetryPolicy(value); return *this;}
130 
131     /**
132      * <p>An object that represents a retry policy.</p>
133      */
WithRetryPolicy(HttpRetryPolicy && value)134     inline HttpRoute& WithRetryPolicy(HttpRetryPolicy&& value) { SetRetryPolicy(std::move(value)); return *this;}
135 
136 
137     /**
138      * <p>An object that represents types of timeouts. </p>
139      */
GetTimeout()140     inline const HttpTimeout& GetTimeout() const{ return m_timeout; }
141 
142     /**
143      * <p>An object that represents types of timeouts. </p>
144      */
TimeoutHasBeenSet()145     inline bool TimeoutHasBeenSet() const { return m_timeoutHasBeenSet; }
146 
147     /**
148      * <p>An object that represents types of timeouts. </p>
149      */
SetTimeout(const HttpTimeout & value)150     inline void SetTimeout(const HttpTimeout& value) { m_timeoutHasBeenSet = true; m_timeout = value; }
151 
152     /**
153      * <p>An object that represents types of timeouts. </p>
154      */
SetTimeout(HttpTimeout && value)155     inline void SetTimeout(HttpTimeout&& value) { m_timeoutHasBeenSet = true; m_timeout = std::move(value); }
156 
157     /**
158      * <p>An object that represents types of timeouts. </p>
159      */
WithTimeout(const HttpTimeout & value)160     inline HttpRoute& WithTimeout(const HttpTimeout& value) { SetTimeout(value); return *this;}
161 
162     /**
163      * <p>An object that represents types of timeouts. </p>
164      */
WithTimeout(HttpTimeout && value)165     inline HttpRoute& WithTimeout(HttpTimeout&& value) { SetTimeout(std::move(value)); return *this;}
166 
167   private:
168 
169     HttpRouteAction m_action;
170     bool m_actionHasBeenSet;
171 
172     HttpRouteMatch m_match;
173     bool m_matchHasBeenSet;
174 
175     HttpRetryPolicy m_retryPolicy;
176     bool m_retryPolicyHasBeenSet;
177 
178     HttpTimeout m_timeout;
179     bool m_timeoutHasBeenSet;
180   };
181 
182 } // namespace Model
183 } // namespace AppMesh
184 } // namespace Aws
185