AWS SDK for C++

AWS SDK for C++ Version 1.11.759

Loading...
Searching...
No Matches
ApiResult.h
1
6#pragma once
7#include <aws/bedrock-agent-runtime/BedrockAgentRuntime_EXPORTS.h>
8#include <aws/bedrock-agent-runtime/model/ConfirmationState.h>
9#include <aws/bedrock-agent-runtime/model/ContentBody.h>
10#include <aws/bedrock-agent-runtime/model/ResponseState.h>
11#include <aws/core/utils/memory/stl/AWSMap.h>
12#include <aws/core/utils/memory/stl/AWSString.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Json {
19class JsonValue;
20class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace BedrockAgentRuntime {
24namespace Model {
25
36class ApiResult {
37 public:
38 AWS_BEDROCKAGENTRUNTIME_API ApiResult() = default;
39 AWS_BEDROCKAGENTRUNTIME_API ApiResult(Aws::Utils::Json::JsonView jsonValue);
41 AWS_BEDROCKAGENTRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const;
42
44
47 inline const Aws::String& GetActionGroup() const { return m_actionGroup; }
48 inline bool ActionGroupHasBeenSet() const { return m_actionGroupHasBeenSet; }
49 template <typename ActionGroupT = Aws::String>
51 m_actionGroupHasBeenSet = true;
52 m_actionGroup = std::forward<ActionGroupT>(value);
53 }
54 template <typename ActionGroupT = Aws::String>
56 SetActionGroup(std::forward<ActionGroupT>(value));
57 return *this;
58 }
60
62
65 inline const Aws::String& GetAgentId() const { return m_agentId; }
66 inline bool AgentIdHasBeenSet() const { return m_agentIdHasBeenSet; }
67 template <typename AgentIdT = Aws::String>
68 void SetAgentId(AgentIdT&& value) {
69 m_agentIdHasBeenSet = true;
70 m_agentId = std::forward<AgentIdT>(value);
71 }
72 template <typename AgentIdT = Aws::String>
74 SetAgentId(std::forward<AgentIdT>(value));
75 return *this;
76 }
78
80
83 inline const Aws::String& GetApiPath() const { return m_apiPath; }
84 inline bool ApiPathHasBeenSet() const { return m_apiPathHasBeenSet; }
85 template <typename ApiPathT = Aws::String>
86 void SetApiPath(ApiPathT&& value) {
87 m_apiPathHasBeenSet = true;
88 m_apiPath = std::forward<ApiPathT>(value);
89 }
90 template <typename ApiPathT = Aws::String>
92 SetApiPath(std::forward<ApiPathT>(value));
93 return *this;
94 }
96
98
102 inline ConfirmationState GetConfirmationState() const { return m_confirmationState; }
103 inline bool ConfirmationStateHasBeenSet() const { return m_confirmationStateHasBeenSet; }
105 m_confirmationStateHasBeenSet = true;
106 m_confirmationState = value;
107 }
110 return *this;
111 }
113
115
118 inline const Aws::String& GetHttpMethod() const { return m_httpMethod; }
119 inline bool HttpMethodHasBeenSet() const { return m_httpMethodHasBeenSet; }
120 template <typename HttpMethodT = Aws::String>
122 m_httpMethodHasBeenSet = true;
123 m_httpMethod = std::forward<HttpMethodT>(value);
124 }
125 template <typename HttpMethodT = Aws::String>
127 SetHttpMethod(std::forward<HttpMethodT>(value));
128 return *this;
129 }
131
133
137 inline int GetHttpStatusCode() const { return m_httpStatusCode; }
138 inline bool HttpStatusCodeHasBeenSet() const { return m_httpStatusCodeHasBeenSet; }
139 inline void SetHttpStatusCode(int value) {
140 m_httpStatusCodeHasBeenSet = true;
141 m_httpStatusCode = value;
142 }
143 inline ApiResult& WithHttpStatusCode(int value) {
144 SetHttpStatusCode(value);
145 return *this;
146 }
148
150
155 inline const Aws::Map<Aws::String, ContentBody>& GetResponseBody() const { return m_responseBody; }
156 inline bool ResponseBodyHasBeenSet() const { return m_responseBodyHasBeenSet; }
157 template <typename ResponseBodyT = Aws::Map<Aws::String, ContentBody>>
159 m_responseBodyHasBeenSet = true;
160 m_responseBody = std::forward<ResponseBodyT>(value);
161 }
162 template <typename ResponseBodyT = Aws::Map<Aws::String, ContentBody>>
164 SetResponseBody(std::forward<ResponseBodyT>(value));
165 return *this;
166 }
167 template <typename ResponseBodyKeyT = Aws::String, typename ResponseBodyValueT = ContentBody>
169 m_responseBodyHasBeenSet = true;
170 m_responseBody.emplace(std::forward<ResponseBodyKeyT>(key), std::forward<ResponseBodyValueT>(value));
171 return *this;
172 }
174
176
182 inline ResponseState GetResponseState() const { return m_responseState; }
183 inline bool ResponseStateHasBeenSet() const { return m_responseStateHasBeenSet; }
184 inline void SetResponseState(ResponseState value) {
185 m_responseStateHasBeenSet = true;
186 m_responseState = value;
187 }
189 SetResponseState(value);
190 return *this;
191 }
193 private:
194 Aws::String m_actionGroup;
195
196 Aws::String m_agentId;
197
198 Aws::String m_apiPath;
199
201
202 Aws::String m_httpMethod;
203
204 int m_httpStatusCode{0};
205
207
208 ResponseState m_responseState{ResponseState::NOT_SET};
209 bool m_actionGroupHasBeenSet = false;
210 bool m_agentIdHasBeenSet = false;
211 bool m_apiPathHasBeenSet = false;
212 bool m_confirmationStateHasBeenSet = false;
213 bool m_httpMethodHasBeenSet = false;
214 bool m_httpStatusCodeHasBeenSet = false;
215 bool m_responseBodyHasBeenSet = false;
216 bool m_responseStateHasBeenSet = false;
217};
218
219} // namespace Model
220} // namespace BedrockAgentRuntime
221} // namespace Aws
void SetHttpMethod(HttpMethodT &&value)
Definition ApiResult.h:121
AWS_BEDROCKAGENTRUNTIME_API ApiResult & operator=(Aws::Utils::Json::JsonView jsonValue)
ApiResult & WithActionGroup(ActionGroupT &&value)
Definition ApiResult.h:55
AWS_BEDROCKAGENTRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::String & GetAgentId() const
Definition ApiResult.h:65
ApiResult & WithHttpStatusCode(int value)
Definition ApiResult.h:143
const Aws::String & GetHttpMethod() const
Definition ApiResult.h:118
const Aws::String & GetApiPath() const
Definition ApiResult.h:83
ApiResult & WithHttpMethod(HttpMethodT &&value)
Definition ApiResult.h:126
ApiResult & WithResponseBody(ResponseBodyT &&value)
Definition ApiResult.h:163
ApiResult & WithResponseState(ResponseState value)
Definition ApiResult.h:188
ConfirmationState GetConfirmationState() const
Definition ApiResult.h:102
ApiResult & AddResponseBody(ResponseBodyKeyT &&key, ResponseBodyValueT &&value)
Definition ApiResult.h:168
ApiResult & WithAgentId(AgentIdT &&value)
Definition ApiResult.h:73
AWS_BEDROCKAGENTRUNTIME_API ApiResult(Aws::Utils::Json::JsonView jsonValue)
const Aws::String & GetActionGroup() const
Definition ApiResult.h:47
void SetResponseBody(ResponseBodyT &&value)
Definition ApiResult.h:158
ApiResult & WithApiPath(ApiPathT &&value)
Definition ApiResult.h:91
AWS_BEDROCKAGENTRUNTIME_API ApiResult()=default
ApiResult & WithConfirmationState(ConfirmationState value)
Definition ApiResult.h:108
void SetActionGroup(ActionGroupT &&value)
Definition ApiResult.h:50
void SetConfirmationState(ConfirmationState value)
Definition ApiResult.h:104
const Aws::Map< Aws::String, ContentBody > & GetResponseBody() const
Definition ApiResult.h:155
void SetResponseState(ResponseState value)
Definition ApiResult.h:184
std::shared_ptr< T > MakeShared(const char *allocationTag, ArgTypes &&... args)
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue