AWS SDK for C++

AWS SDK for C++ Version 1.11.849

Loading...
Searching...
No Matches
AgenticRetrieveStreamRequest.h
1
6#pragma once
7#include <aws/bedrock-agent-runtime/BedrockAgentRuntimeRequest.h>
8#include <aws/bedrock-agent-runtime/BedrockAgentRuntime_EXPORTS.h>
9#include <aws/bedrock-agent-runtime/model/AgenticRetrieveConfiguration.h>
10#include <aws/bedrock-agent-runtime/model/AgenticRetrieveMessage.h>
11#include <aws/bedrock-agent-runtime/model/AgenticRetrievePolicyConfiguration.h>
12#include <aws/bedrock-agent-runtime/model/AgenticRetrieveStreamHandler.h>
13#include <aws/bedrock-agent-runtime/model/AgenticRetriever.h>
14#include <aws/bedrock-agent-runtime/model/UserContext.h>
15#include <aws/core/utils/event/EventStreamDecoder.h>
16#include <aws/core/utils/memory/stl/AWSString.h>
17#include <aws/core/utils/memory/stl/AWSVector.h>
18
19#include <utility>
20
21namespace Aws {
22namespace BedrockAgentRuntime {
23namespace Model {
24
32 public:
33 AWS_BEDROCKAGENTRUNTIME_API AgenticRetrieveStreamRequest() = default;
34
35 // Service request name is the Operation name which will send this request out,
36 // each operation should has unique request name, so that we can get operation's name from this request.
37 // Note: this is not true for response, multiple operations may have the same response name,
38 // so we can not get operation's name from response.
39 inline virtual const char* GetServiceRequestName() const override { return "AgenticRetrieveStream"; }
40
41 inline virtual bool HasEventStreamResponse() const override { return true; }
42 AWS_BEDROCKAGENTRUNTIME_API Aws::String SerializePayload() const override;
43
48
53
58 m_handler = value;
59 m_decoder.ResetEventStreamHandler(&m_handler);
60 }
61
67 return *this;
68 }
69
71
74 inline const AgenticRetrieveConfiguration& GetAgenticRetrieveConfiguration() const { return m_agenticRetrieveConfiguration; }
75 inline bool AgenticRetrieveConfigurationHasBeenSet() const { return m_agenticRetrieveConfigurationHasBeenSet; }
76 template <typename AgenticRetrieveConfigurationT = AgenticRetrieveConfiguration>
78 m_agenticRetrieveConfigurationHasBeenSet = true;
79 m_agenticRetrieveConfiguration = std::forward<AgenticRetrieveConfigurationT>(value);
80 }
81 template <typename AgenticRetrieveConfigurationT = AgenticRetrieveConfiguration>
83 SetAgenticRetrieveConfiguration(std::forward<AgenticRetrieveConfigurationT>(value));
84 return *this;
85 }
87
89
92 inline bool GetGenerateResponse() const { return m_generateResponse; }
93 inline bool GenerateResponseHasBeenSet() const { return m_generateResponseHasBeenSet; }
94 inline void SetGenerateResponse(bool value) {
95 m_generateResponseHasBeenSet = true;
96 m_generateResponse = value;
97 }
100 return *this;
101 }
103
105
108 inline const Aws::Vector<AgenticRetrieveMessage>& GetMessages() const { return m_messages; }
109 inline bool MessagesHasBeenSet() const { return m_messagesHasBeenSet; }
110 template <typename MessagesT = Aws::Vector<AgenticRetrieveMessage>>
111 void SetMessages(MessagesT&& value) {
112 m_messagesHasBeenSet = true;
113 m_messages = std::forward<MessagesT>(value);
114 }
115 template <typename MessagesT = Aws::Vector<AgenticRetrieveMessage>>
117 SetMessages(std::forward<MessagesT>(value));
118 return *this;
119 }
120 template <typename MessagesT = AgenticRetrieveMessage>
122 m_messagesHasBeenSet = true;
123 m_messages.emplace_back(std::forward<MessagesT>(value));
124 return *this;
125 }
127
129
132 inline const Aws::String& GetNextToken() const { return m_nextToken; }
133 inline bool NextTokenHasBeenSet() const { return m_nextTokenHasBeenSet; }
134 template <typename NextTokenT = Aws::String>
135 void SetNextToken(NextTokenT&& value) {
136 m_nextTokenHasBeenSet = true;
137 m_nextToken = std::forward<NextTokenT>(value);
138 }
139 template <typename NextTokenT = Aws::String>
141 SetNextToken(std::forward<NextTokenT>(value));
142 return *this;
143 }
145
147
150 inline const AgenticRetrievePolicyConfiguration& GetPolicyConfiguration() const { return m_policyConfiguration; }
151 inline bool PolicyConfigurationHasBeenSet() const { return m_policyConfigurationHasBeenSet; }
152 template <typename PolicyConfigurationT = AgenticRetrievePolicyConfiguration>
154 m_policyConfigurationHasBeenSet = true;
155 m_policyConfiguration = std::forward<PolicyConfigurationT>(value);
156 }
157 template <typename PolicyConfigurationT = AgenticRetrievePolicyConfiguration>
159 SetPolicyConfiguration(std::forward<PolicyConfigurationT>(value));
160 return *this;
161 }
163
165
168 inline const Aws::Vector<AgenticRetriever>& GetRetrievers() const { return m_retrievers; }
169 inline bool RetrieversHasBeenSet() const { return m_retrieversHasBeenSet; }
170 template <typename RetrieversT = Aws::Vector<AgenticRetriever>>
172 m_retrieversHasBeenSet = true;
173 m_retrievers = std::forward<RetrieversT>(value);
174 }
175 template <typename RetrieversT = Aws::Vector<AgenticRetriever>>
177 SetRetrievers(std::forward<RetrieversT>(value));
178 return *this;
179 }
180 template <typename RetrieversT = AgenticRetriever>
182 m_retrieversHasBeenSet = true;
183 m_retrievers.emplace_back(std::forward<RetrieversT>(value));
184 return *this;
185 }
187
189
194 inline const UserContext& GetUserContext() const { return m_userContext; }
195 inline bool UserContextHasBeenSet() const { return m_userContextHasBeenSet; }
196 template <typename UserContextT = UserContext>
198 m_userContextHasBeenSet = true;
199 m_userContext = std::forward<UserContextT>(value);
200 }
201 template <typename UserContextT = UserContext>
203 SetUserContext(std::forward<UserContextT>(value));
204 return *this;
205 }
207 private:
208 AgenticRetrieveConfiguration m_agenticRetrieveConfiguration;
209
210 bool m_generateResponse{false};
211
213
214 Aws::String m_nextToken;
215
216 AgenticRetrievePolicyConfiguration m_policyConfiguration;
217
219
220 UserContext m_userContext;
221 AgenticRetrieveStreamHandler m_handler;
223
224 bool m_agenticRetrieveConfigurationHasBeenSet = false;
225 bool m_generateResponseHasBeenSet = false;
226 bool m_messagesHasBeenSet = false;
227 bool m_nextTokenHasBeenSet = false;
228 bool m_policyConfigurationHasBeenSet = false;
229 bool m_retrieversHasBeenSet = false;
230 bool m_userContextHasBeenSet = false;
231};
232
233} // namespace Model
234} // namespace BedrockAgentRuntime
235} // namespace Aws
AgenticRetrieveStreamRequest & AddMessages(MessagesT &&value)
AgenticRetrieveStreamRequest & WithPolicyConfiguration(PolicyConfigurationT &&value)
const Aws::Vector< AgenticRetrieveMessage > & GetMessages() const
AgenticRetrieveStreamRequest & WithEventStreamHandler(const AgenticRetrieveStreamHandler &value)
AgenticRetrieveStreamRequest & WithMessages(MessagesT &&value)
AgenticRetrieveStreamRequest & WithUserContext(UserContextT &&value)
AgenticRetrieveStreamRequest & WithNextToken(NextTokenT &&value)
void SetEventStreamHandler(const AgenticRetrieveStreamHandler &value)
const AgenticRetrievePolicyConfiguration & GetPolicyConfiguration() const
AWS_BEDROCKAGENTRUNTIME_API Aws::String SerializePayload() const override
AgenticRetrieveStreamRequest & AddRetrievers(RetrieversT &&value)
const AgenticRetrieveConfiguration & GetAgenticRetrieveConfiguration() const
AWS_BEDROCKAGENTRUNTIME_API AgenticRetrieveStreamRequest()=default
void SetAgenticRetrieveConfiguration(AgenticRetrieveConfigurationT &&value)
AgenticRetrieveStreamRequest & WithAgenticRetrieveConfiguration(AgenticRetrieveConfigurationT &&value)
AgenticRetrieveStreamRequest & WithRetrievers(RetrieversT &&value)
void ResetEventStreamHandler(EventStreamHandler *handler)
std::shared_ptr< T > MakeShared(const char *allocationTag, ArgTypes &&... args)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector