AWS SDK for C++

AWS SDK for C++ Version 1.11.930

Loading...
Searching...
No Matches
SessionState.h
1
6#pragma once
7#include <aws/bedrock-agent-runtime/BedrockAgentRuntime_EXPORTS.h>
8#include <aws/bedrock-agent-runtime/model/ConversationHistory.h>
9#include <aws/bedrock-agent-runtime/model/InputFile.h>
10#include <aws/bedrock-agent-runtime/model/InvocationResultMember.h>
11#include <aws/bedrock-agent-runtime/model/KnowledgeBaseConfiguration.h>
12#include <aws/core/utils/memory/stl/AWSMap.h>
13#include <aws/core/utils/memory/stl/AWSString.h>
14#include <aws/core/utils/memory/stl/AWSVector.h>
15
16#include <utility>
17
18namespace Aws {
19namespace Utils {
20namespace Json {
21class JsonValue;
22class JsonView;
23} // namespace Json
24} // namespace Utils
25namespace BedrockAgentRuntime {
26namespace Model {
27
44 public:
45 AWS_BEDROCKAGENTRUNTIME_API SessionState() = default;
46 AWS_BEDROCKAGENTRUNTIME_API SessionState(Aws::Utils::Json::JsonView jsonValue);
47 AWS_BEDROCKAGENTRUNTIME_API SessionState& operator=(Aws::Utils::Json::JsonView jsonValue);
48 AWS_BEDROCKAGENTRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const;
49
51
54 inline const ConversationHistory& GetConversationHistory() const { return m_conversationHistory; }
55 inline bool ConversationHistoryHasBeenSet() const { return m_conversationHistoryHasBeenSet; }
56 template <typename ConversationHistoryT = ConversationHistory>
57 void SetConversationHistory(ConversationHistoryT&& value) {
58 m_conversationHistoryHasBeenSet = true;
59 m_conversationHistory = std::forward<ConversationHistoryT>(value);
60 }
61 template <typename ConversationHistoryT = ConversationHistory>
62 SessionState& WithConversationHistory(ConversationHistoryT&& value) {
63 SetConversationHistory(std::forward<ConversationHistoryT>(value));
64 return *this;
65 }
67
69
72 inline const Aws::Vector<InputFile>& GetFiles() const { return m_files; }
73 inline bool FilesHasBeenSet() const { return m_filesHasBeenSet; }
74 template <typename FilesT = Aws::Vector<InputFile>>
75 void SetFiles(FilesT&& value) {
76 m_filesHasBeenSet = true;
77 m_files = std::forward<FilesT>(value);
78 }
79 template <typename FilesT = Aws::Vector<InputFile>>
80 SessionState& WithFiles(FilesT&& value) {
81 SetFiles(std::forward<FilesT>(value));
82 return *this;
83 }
84 template <typename FilesT = InputFile>
85 SessionState& AddFiles(FilesT&& value) {
86 m_filesHasBeenSet = true;
87 m_files.emplace_back(std::forward<FilesT>(value));
88 return *this;
89 }
91
93
103 inline const Aws::String& GetInvocationId() const { return m_invocationId; }
104 inline bool InvocationIdHasBeenSet() const { return m_invocationIdHasBeenSet; }
105 template <typename InvocationIdT = Aws::String>
106 void SetInvocationId(InvocationIdT&& value) {
107 m_invocationIdHasBeenSet = true;
108 m_invocationId = std::forward<InvocationIdT>(value);
109 }
110 template <typename InvocationIdT = Aws::String>
111 SessionState& WithInvocationId(InvocationIdT&& value) {
112 SetInvocationId(std::forward<InvocationIdT>(value));
113 return *this;
114 }
116
118
122 inline const Aws::Vector<KnowledgeBaseConfiguration>& GetKnowledgeBaseConfigurations() const { return m_knowledgeBaseConfigurations; }
123 inline bool KnowledgeBaseConfigurationsHasBeenSet() const { return m_knowledgeBaseConfigurationsHasBeenSet; }
124 template <typename KnowledgeBaseConfigurationsT = Aws::Vector<KnowledgeBaseConfiguration>>
125 void SetKnowledgeBaseConfigurations(KnowledgeBaseConfigurationsT&& value) {
126 m_knowledgeBaseConfigurationsHasBeenSet = true;
127 m_knowledgeBaseConfigurations = std::forward<KnowledgeBaseConfigurationsT>(value);
128 }
129 template <typename KnowledgeBaseConfigurationsT = Aws::Vector<KnowledgeBaseConfiguration>>
130 SessionState& WithKnowledgeBaseConfigurations(KnowledgeBaseConfigurationsT&& value) {
131 SetKnowledgeBaseConfigurations(std::forward<KnowledgeBaseConfigurationsT>(value));
132 return *this;
133 }
134 template <typename KnowledgeBaseConfigurationsT = KnowledgeBaseConfiguration>
135 SessionState& AddKnowledgeBaseConfigurations(KnowledgeBaseConfigurationsT&& value) {
136 m_knowledgeBaseConfigurationsHasBeenSet = true;
137 m_knowledgeBaseConfigurations.emplace_back(std::forward<KnowledgeBaseConfigurationsT>(value));
138 return *this;
139 }
141
143
155 inline const Aws::Map<Aws::String, Aws::String>& GetPromptSessionAttributes() const { return m_promptSessionAttributes; }
156 inline bool PromptSessionAttributesHasBeenSet() const { return m_promptSessionAttributesHasBeenSet; }
157 template <typename PromptSessionAttributesT = Aws::Map<Aws::String, Aws::String>>
158 void SetPromptSessionAttributes(PromptSessionAttributesT&& value) {
159 m_promptSessionAttributesHasBeenSet = true;
160 m_promptSessionAttributes = std::forward<PromptSessionAttributesT>(value);
161 }
162 template <typename PromptSessionAttributesT = Aws::Map<Aws::String, Aws::String>>
163 SessionState& WithPromptSessionAttributes(PromptSessionAttributesT&& value) {
164 SetPromptSessionAttributes(std::forward<PromptSessionAttributesT>(value));
165 return *this;
166 }
167 template <typename PromptSessionAttributesKeyT = Aws::String, typename PromptSessionAttributesValueT = Aws::String>
168 SessionState& AddPromptSessionAttributes(PromptSessionAttributesKeyT&& key, PromptSessionAttributesValueT&& value) {
169 m_promptSessionAttributesHasBeenSet = true;
170 m_promptSessionAttributes.emplace(std::forward<PromptSessionAttributesKeyT>(key), std::forward<PromptSessionAttributesValueT>(value));
171 return *this;
172 }
174
176
185 inline const Aws::Vector<InvocationResultMember>& GetReturnControlInvocationResults() const { return m_returnControlInvocationResults; }
186 inline bool ReturnControlInvocationResultsHasBeenSet() const { return m_returnControlInvocationResultsHasBeenSet; }
187 template <typename ReturnControlInvocationResultsT = Aws::Vector<InvocationResultMember>>
188 void SetReturnControlInvocationResults(ReturnControlInvocationResultsT&& value) {
189 m_returnControlInvocationResultsHasBeenSet = true;
190 m_returnControlInvocationResults = std::forward<ReturnControlInvocationResultsT>(value);
191 }
192 template <typename ReturnControlInvocationResultsT = Aws::Vector<InvocationResultMember>>
193 SessionState& WithReturnControlInvocationResults(ReturnControlInvocationResultsT&& value) {
194 SetReturnControlInvocationResults(std::forward<ReturnControlInvocationResultsT>(value));
195 return *this;
196 }
197 template <typename ReturnControlInvocationResultsT = InvocationResultMember>
198 SessionState& AddReturnControlInvocationResults(ReturnControlInvocationResultsT&& value) {
199 m_returnControlInvocationResultsHasBeenSet = true;
200 m_returnControlInvocationResults.emplace_back(std::forward<ReturnControlInvocationResultsT>(value));
201 return *this;
202 }
204
206
213 inline const Aws::Map<Aws::String, Aws::String>& GetSessionAttributes() const { return m_sessionAttributes; }
214 inline bool SessionAttributesHasBeenSet() const { return m_sessionAttributesHasBeenSet; }
215 template <typename SessionAttributesT = Aws::Map<Aws::String, Aws::String>>
216 void SetSessionAttributes(SessionAttributesT&& value) {
217 m_sessionAttributesHasBeenSet = true;
218 m_sessionAttributes = std::forward<SessionAttributesT>(value);
219 }
220 template <typename SessionAttributesT = Aws::Map<Aws::String, Aws::String>>
221 SessionState& WithSessionAttributes(SessionAttributesT&& value) {
222 SetSessionAttributes(std::forward<SessionAttributesT>(value));
223 return *this;
224 }
225 template <typename SessionAttributesKeyT = Aws::String, typename SessionAttributesValueT = Aws::String>
226 SessionState& AddSessionAttributes(SessionAttributesKeyT&& key, SessionAttributesValueT&& value) {
227 m_sessionAttributesHasBeenSet = true;
228 m_sessionAttributes.emplace(std::forward<SessionAttributesKeyT>(key), std::forward<SessionAttributesValueT>(value));
229 return *this;
230 }
232 private:
233 ConversationHistory m_conversationHistory;
234
236
237 Aws::String m_invocationId;
238
239 Aws::Vector<KnowledgeBaseConfiguration> m_knowledgeBaseConfigurations;
240
241 Aws::Map<Aws::String, Aws::String> m_promptSessionAttributes;
242
243 Aws::Vector<InvocationResultMember> m_returnControlInvocationResults;
244
245 Aws::Map<Aws::String, Aws::String> m_sessionAttributes;
246 bool m_conversationHistoryHasBeenSet = false;
247 bool m_filesHasBeenSet = false;
248 bool m_invocationIdHasBeenSet = false;
249 bool m_knowledgeBaseConfigurationsHasBeenSet = false;
250 bool m_promptSessionAttributesHasBeenSet = false;
251 bool m_returnControlInvocationResultsHasBeenSet = false;
252 bool m_sessionAttributesHasBeenSet = false;
253};
254
255} // namespace Model
256} // namespace BedrockAgentRuntime
257} // namespace Aws
void SetPromptSessionAttributes(PromptSessionAttributesT &&value)
const Aws::Map< Aws::String, Aws::String > & GetSessionAttributes() const
const Aws::Vector< KnowledgeBaseConfiguration > & GetKnowledgeBaseConfigurations() const
SessionState & AddPromptSessionAttributes(PromptSessionAttributesKeyT &&key, PromptSessionAttributesValueT &&value)
AWS_BEDROCKAGENTRUNTIME_API SessionState()=default
AWS_BEDROCKAGENTRUNTIME_API SessionState & operator=(Aws::Utils::Json::JsonView jsonValue)
SessionState & WithInvocationId(InvocationIdT &&value)
const Aws::Vector< InvocationResultMember > & GetReturnControlInvocationResults() const
SessionState & WithFiles(FilesT &&value)
const Aws::Vector< InputFile > & GetFiles() const
SessionState & AddSessionAttributes(SessionAttributesKeyT &&key, SessionAttributesValueT &&value)
const Aws::String & GetInvocationId() const
AWS_BEDROCKAGENTRUNTIME_API SessionState(Aws::Utils::Json::JsonView jsonValue)
SessionState & WithConversationHistory(ConversationHistoryT &&value)
SessionState & WithSessionAttributes(SessionAttributesT &&value)
AWS_BEDROCKAGENTRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const
void SetSessionAttributes(SessionAttributesT &&value)
SessionState & AddReturnControlInvocationResults(ReturnControlInvocationResultsT &&value)
void SetKnowledgeBaseConfigurations(KnowledgeBaseConfigurationsT &&value)
void SetConversationHistory(ConversationHistoryT &&value)
SessionState & AddFiles(FilesT &&value)
const Aws::Map< Aws::String, Aws::String > & GetPromptSessionAttributes() const
SessionState & WithPromptSessionAttributes(PromptSessionAttributesT &&value)
const ConversationHistory & GetConversationHistory() const
void SetInvocationId(InvocationIdT &&value)
SessionState & WithKnowledgeBaseConfigurations(KnowledgeBaseConfigurationsT &&value)
SessionState & AddKnowledgeBaseConfigurations(KnowledgeBaseConfigurationsT &&value)
SessionState & WithReturnControlInvocationResults(ReturnControlInvocationResultsT &&value)
void SetReturnControlInvocationResults(ReturnControlInvocationResultsT &&value)
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
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue