AWS SDK for C++

AWS SDK for C++ Version 1.11.849

Loading...
Searching...
No Matches
RetrieveAndGenerateStreamRequest.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/RetrieveAndGenerateConfiguration.h>
10#include <aws/bedrock-agent-runtime/model/RetrieveAndGenerateInput.h>
11#include <aws/bedrock-agent-runtime/model/RetrieveAndGenerateSessionConfiguration.h>
12#include <aws/bedrock-agent-runtime/model/RetrieveAndGenerateStreamHandler.h>
13#include <aws/bedrock-agent-runtime/model/UserContext.h>
14#include <aws/core/utils/event/EventStreamDecoder.h>
15#include <aws/core/utils/memory/stl/AWSString.h>
16
17#include <utility>
18
19namespace Aws {
20namespace BedrockAgentRuntime {
21namespace Model {
22
26 public:
27 AWS_BEDROCKAGENTRUNTIME_API RetrieveAndGenerateStreamRequest() = default;
28
29 // Service request name is the Operation name which will send this request out,
30 // each operation should has unique request name, so that we can get operation's name from this request.
31 // Note: this is not true for response, multiple operations may have the same response name,
32 // so we can not get operation's name from response.
33 inline virtual const char* GetServiceRequestName() const override { return "RetrieveAndGenerateStream"; }
34
35 inline virtual bool HasEventStreamResponse() const override { return true; }
36 AWS_BEDROCKAGENTRUNTIME_API Aws::String SerializePayload() const override;
37
42
47
52 m_handler = value;
53 m_decoder.ResetEventStreamHandler(&m_handler);
54 }
55
61 return *this;
62 }
63
65
68 inline const RetrieveAndGenerateInput& GetInput() const { return m_input; }
69 inline bool InputHasBeenSet() const { return m_inputHasBeenSet; }
70 template <typename InputT = RetrieveAndGenerateInput>
71 void SetInput(InputT&& value) {
72 m_inputHasBeenSet = true;
73 m_input = std::forward<InputT>(value);
74 }
75 template <typename InputT = RetrieveAndGenerateInput>
77 SetInput(std::forward<InputT>(value));
78 return *this;
79 }
81
83
89 inline const RetrieveAndGenerateConfiguration& GetRetrieveAndGenerateConfiguration() const { return m_retrieveAndGenerateConfiguration; }
90 inline bool RetrieveAndGenerateConfigurationHasBeenSet() const { return m_retrieveAndGenerateConfigurationHasBeenSet; }
91 template <typename RetrieveAndGenerateConfigurationT = RetrieveAndGenerateConfiguration>
93 m_retrieveAndGenerateConfigurationHasBeenSet = true;
94 m_retrieveAndGenerateConfiguration = std::forward<RetrieveAndGenerateConfigurationT>(value);
95 }
96 template <typename RetrieveAndGenerateConfigurationT = RetrieveAndGenerateConfiguration>
98 SetRetrieveAndGenerateConfiguration(std::forward<RetrieveAndGenerateConfigurationT>(value));
99 return *this;
100 }
102
104
107 inline const RetrieveAndGenerateSessionConfiguration& GetSessionConfiguration() const { return m_sessionConfiguration; }
108 inline bool SessionConfigurationHasBeenSet() const { return m_sessionConfigurationHasBeenSet; }
109 template <typename SessionConfigurationT = RetrieveAndGenerateSessionConfiguration>
111 m_sessionConfigurationHasBeenSet = true;
112 m_sessionConfiguration = std::forward<SessionConfigurationT>(value);
113 }
114 template <typename SessionConfigurationT = RetrieveAndGenerateSessionConfiguration>
116 SetSessionConfiguration(std::forward<SessionConfigurationT>(value));
117 return *this;
118 }
120
122
130 inline const Aws::String& GetSessionId() const { return m_sessionId; }
131 inline bool SessionIdHasBeenSet() const { return m_sessionIdHasBeenSet; }
132 template <typename SessionIdT = Aws::String>
133 void SetSessionId(SessionIdT&& value) {
134 m_sessionIdHasBeenSet = true;
135 m_sessionId = std::forward<SessionIdT>(value);
136 }
137 template <typename SessionIdT = Aws::String>
139 SetSessionId(std::forward<SessionIdT>(value));
140 return *this;
141 }
143
145
146 inline const UserContext& GetUserContext() const { return m_userContext; }
147 inline bool UserContextHasBeenSet() const { return m_userContextHasBeenSet; }
148 template <typename UserContextT = UserContext>
150 m_userContextHasBeenSet = true;
151 m_userContext = std::forward<UserContextT>(value);
152 }
153 template <typename UserContextT = UserContext>
155 SetUserContext(std::forward<UserContextT>(value));
156 return *this;
157 }
159 private:
161
162 RetrieveAndGenerateConfiguration m_retrieveAndGenerateConfiguration;
163
164 RetrieveAndGenerateSessionConfiguration m_sessionConfiguration;
165
166 Aws::String m_sessionId;
167
168 UserContext m_userContext;
171
172 bool m_inputHasBeenSet = false;
173 bool m_retrieveAndGenerateConfigurationHasBeenSet = false;
174 bool m_sessionConfigurationHasBeenSet = false;
175 bool m_sessionIdHasBeenSet = false;
176 bool m_userContextHasBeenSet = false;
177};
178
179} // namespace Model
180} // namespace BedrockAgentRuntime
181} // namespace Aws
void SetRetrieveAndGenerateConfiguration(RetrieveAndGenerateConfigurationT &&value)
RetrieveAndGenerateStreamRequest & WithUserContext(UserContextT &&value)
const RetrieveAndGenerateConfiguration & GetRetrieveAndGenerateConfiguration() const
RetrieveAndGenerateStreamRequest & WithEventStreamHandler(const RetrieveAndGenerateStreamHandler &value)
AWS_BEDROCKAGENTRUNTIME_API Aws::String SerializePayload() const override
RetrieveAndGenerateStreamRequest & WithSessionId(SessionIdT &&value)
RetrieveAndGenerateStreamRequest & WithSessionConfiguration(SessionConfigurationT &&value)
const RetrieveAndGenerateSessionConfiguration & GetSessionConfiguration() const
void SetEventStreamHandler(const RetrieveAndGenerateStreamHandler &value)
RetrieveAndGenerateStreamRequest & WithRetrieveAndGenerateConfiguration(RetrieveAndGenerateConfigurationT &&value)
AWS_BEDROCKAGENTRUNTIME_API RetrieveAndGenerateStreamRequest()=default
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