AWS SDK for C++

AWS SDK for C++ Version 1.11.759

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/core/utils/event/EventStreamDecoder.h>
14#include <aws/core/utils/memory/stl/AWSString.h>
15
16#include <utility>
17
18namespace Aws {
19namespace BedrockAgentRuntime {
20namespace Model {
21
25 public:
26 AWS_BEDROCKAGENTRUNTIME_API RetrieveAndGenerateStreamRequest() = default;
27
28 // Service request name is the Operation name which will send this request out,
29 // each operation should has unique request name, so that we can get operation's name from this request.
30 // Note: this is not true for response, multiple operations may have the same response name,
31 // so we can not get operation's name from response.
32 inline virtual const char* GetServiceRequestName() const override { return "RetrieveAndGenerateStream"; }
33
34 inline virtual bool HasEventStreamResponse() const override { return true; }
35 AWS_BEDROCKAGENTRUNTIME_API Aws::String SerializePayload() const override;
36
41
46
51 m_handler = value;
52 m_decoder.ResetEventStreamHandler(&m_handler);
53 }
54
60 return *this;
61 }
62
64
67 inline const RetrieveAndGenerateInput& GetInput() const { return m_input; }
68 inline bool InputHasBeenSet() const { return m_inputHasBeenSet; }
69 template <typename InputT = RetrieveAndGenerateInput>
70 void SetInput(InputT&& value) {
71 m_inputHasBeenSet = true;
72 m_input = std::forward<InputT>(value);
73 }
74 template <typename InputT = RetrieveAndGenerateInput>
76 SetInput(std::forward<InputT>(value));
77 return *this;
78 }
80
82
88 inline const RetrieveAndGenerateConfiguration& GetRetrieveAndGenerateConfiguration() const { return m_retrieveAndGenerateConfiguration; }
89 inline bool RetrieveAndGenerateConfigurationHasBeenSet() const { return m_retrieveAndGenerateConfigurationHasBeenSet; }
90 template <typename RetrieveAndGenerateConfigurationT = RetrieveAndGenerateConfiguration>
92 m_retrieveAndGenerateConfigurationHasBeenSet = true;
93 m_retrieveAndGenerateConfiguration = std::forward<RetrieveAndGenerateConfigurationT>(value);
94 }
95 template <typename RetrieveAndGenerateConfigurationT = RetrieveAndGenerateConfiguration>
97 SetRetrieveAndGenerateConfiguration(std::forward<RetrieveAndGenerateConfigurationT>(value));
98 return *this;
99 }
101
103
106 inline const RetrieveAndGenerateSessionConfiguration& GetSessionConfiguration() const { return m_sessionConfiguration; }
107 inline bool SessionConfigurationHasBeenSet() const { return m_sessionConfigurationHasBeenSet; }
108 template <typename SessionConfigurationT = RetrieveAndGenerateSessionConfiguration>
110 m_sessionConfigurationHasBeenSet = true;
111 m_sessionConfiguration = std::forward<SessionConfigurationT>(value);
112 }
113 template <typename SessionConfigurationT = RetrieveAndGenerateSessionConfiguration>
115 SetSessionConfiguration(std::forward<SessionConfigurationT>(value));
116 return *this;
117 }
119
121
129 inline const Aws::String& GetSessionId() const { return m_sessionId; }
130 inline bool SessionIdHasBeenSet() const { return m_sessionIdHasBeenSet; }
131 template <typename SessionIdT = Aws::String>
132 void SetSessionId(SessionIdT&& value) {
133 m_sessionIdHasBeenSet = true;
134 m_sessionId = std::forward<SessionIdT>(value);
135 }
136 template <typename SessionIdT = Aws::String>
138 SetSessionId(std::forward<SessionIdT>(value));
139 return *this;
140 }
142 private:
144
145 RetrieveAndGenerateConfiguration m_retrieveAndGenerateConfiguration;
146
147 RetrieveAndGenerateSessionConfiguration m_sessionConfiguration;
148
149 Aws::String m_sessionId;
152
153 bool m_inputHasBeenSet = false;
154 bool m_retrieveAndGenerateConfigurationHasBeenSet = false;
155 bool m_sessionConfigurationHasBeenSet = false;
156 bool m_sessionIdHasBeenSet = false;
157};
158
159} // namespace Model
160} // namespace BedrockAgentRuntime
161} // namespace Aws
void SetRetrieveAndGenerateConfiguration(RetrieveAndGenerateConfigurationT &&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