AWS SDK for C++

AWS SDK for C++ Version 1.11.748

Loading...
Searching...
No Matches
ConverseStreamOutput.h
1
6#pragma once
7#include <aws/bedrock-runtime/BedrockRuntime_EXPORTS.h>
8#include <aws/bedrock-runtime/model/ContentBlockDeltaEvent.h>
9#include <aws/bedrock-runtime/model/ContentBlockStartEvent.h>
10#include <aws/bedrock-runtime/model/ContentBlockStopEvent.h>
11#include <aws/bedrock-runtime/model/ConverseStreamMetadataEvent.h>
12#include <aws/bedrock-runtime/model/MessageStartEvent.h>
13#include <aws/bedrock-runtime/model/MessageStopEvent.h>
14#include <aws/bedrock-runtime/model/ModelStreamErrorException.h>
15
16#include <utility>
17
18namespace Aws {
19namespace Utils {
20namespace Json {
21class JsonValue;
22class JsonView;
23} // namespace Json
24} // namespace Utils
25namespace BedrockRuntime {
26namespace Model {
27
34 public:
35 AWS_BEDROCKRUNTIME_API ConverseStreamOutput() = default;
38 AWS_BEDROCKRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const;
39
41
44 inline const MessageStartEvent& GetMessageStart() const { return m_messageStart; }
45 inline bool MessageStartHasBeenSet() const { return m_messageStartHasBeenSet; }
46 template <typename MessageStartT = MessageStartEvent>
48 m_messageStartHasBeenSet = true;
49 m_messageStart = std::forward<MessageStartT>(value);
50 }
51 template <typename MessageStartT = MessageStartEvent>
53 SetMessageStart(std::forward<MessageStartT>(value));
54 return *this;
55 }
57
59
62 inline const ContentBlockStartEvent& GetContentBlockStart() const { return m_contentBlockStart; }
63 inline bool ContentBlockStartHasBeenSet() const { return m_contentBlockStartHasBeenSet; }
64 template <typename ContentBlockStartT = ContentBlockStartEvent>
66 m_contentBlockStartHasBeenSet = true;
67 m_contentBlockStart = std::forward<ContentBlockStartT>(value);
68 }
69 template <typename ContentBlockStartT = ContentBlockStartEvent>
71 SetContentBlockStart(std::forward<ContentBlockStartT>(value));
72 return *this;
73 }
75
77
80 inline const ContentBlockDeltaEvent& GetContentBlockDelta() const { return m_contentBlockDelta; }
81 inline bool ContentBlockDeltaHasBeenSet() const { return m_contentBlockDeltaHasBeenSet; }
82 template <typename ContentBlockDeltaT = ContentBlockDeltaEvent>
84 m_contentBlockDeltaHasBeenSet = true;
85 m_contentBlockDelta = std::forward<ContentBlockDeltaT>(value);
86 }
87 template <typename ContentBlockDeltaT = ContentBlockDeltaEvent>
89 SetContentBlockDelta(std::forward<ContentBlockDeltaT>(value));
90 return *this;
91 }
93
95
98 inline const ContentBlockStopEvent& GetContentBlockStop() const { return m_contentBlockStop; }
99 inline bool ContentBlockStopHasBeenSet() const { return m_contentBlockStopHasBeenSet; }
100 template <typename ContentBlockStopT = ContentBlockStopEvent>
102 m_contentBlockStopHasBeenSet = true;
103 m_contentBlockStop = std::forward<ContentBlockStopT>(value);
104 }
105 template <typename ContentBlockStopT = ContentBlockStopEvent>
107 SetContentBlockStop(std::forward<ContentBlockStopT>(value));
108 return *this;
109 }
111
113
116 inline const MessageStopEvent& GetMessageStop() const { return m_messageStop; }
117 inline bool MessageStopHasBeenSet() const { return m_messageStopHasBeenSet; }
118 template <typename MessageStopT = MessageStopEvent>
120 m_messageStopHasBeenSet = true;
121 m_messageStop = std::forward<MessageStopT>(value);
122 }
123 template <typename MessageStopT = MessageStopEvent>
125 SetMessageStop(std::forward<MessageStopT>(value));
126 return *this;
127 }
129
131
134 inline const ConverseStreamMetadataEvent& GetMetadata() const { return m_metadata; }
135 inline bool MetadataHasBeenSet() const { return m_metadataHasBeenSet; }
136 template <typename MetadataT = ConverseStreamMetadataEvent>
137 void SetMetadata(MetadataT&& value) {
138 m_metadataHasBeenSet = true;
139 m_metadata = std::forward<MetadataT>(value);
140 }
141 template <typename MetadataT = ConverseStreamMetadataEvent>
143 SetMetadata(std::forward<MetadataT>(value));
144 return *this;
145 }
147
149
152 inline const BedrockRuntimeError& GetInternalServerException() const { return m_internalServerException; }
153 inline bool InternalServerExceptionHasBeenSet() const { return m_internalServerExceptionHasBeenSet; }
154 template <typename InternalServerExceptionT = BedrockRuntimeError>
156 m_internalServerExceptionHasBeenSet = true;
157 m_internalServerException = std::forward<InternalServerExceptionT>(value);
158 }
159 template <typename InternalServerExceptionT = BedrockRuntimeError>
161 SetInternalServerException(std::forward<InternalServerExceptionT>(value));
162 return *this;
163 }
165
167
170 inline const ModelStreamErrorException& GetModelStreamErrorException() const { return m_modelStreamErrorException; }
171 inline bool ModelStreamErrorExceptionHasBeenSet() const { return m_modelStreamErrorExceptionHasBeenSet; }
172 template <typename ModelStreamErrorExceptionT = ModelStreamErrorException>
174 m_modelStreamErrorExceptionHasBeenSet = true;
175 m_modelStreamErrorException = std::forward<ModelStreamErrorExceptionT>(value);
176 }
177 template <typename ModelStreamErrorExceptionT = ModelStreamErrorException>
179 SetModelStreamErrorException(std::forward<ModelStreamErrorExceptionT>(value));
180 return *this;
181 }
183
185
191 inline const BedrockRuntimeError& GetValidationException() const { return m_validationException; }
192 inline bool ValidationExceptionHasBeenSet() const { return m_validationExceptionHasBeenSet; }
193 template <typename ValidationExceptionT = BedrockRuntimeError>
195 m_validationExceptionHasBeenSet = true;
196 m_validationException = std::forward<ValidationExceptionT>(value);
197 }
198 template <typename ValidationExceptionT = BedrockRuntimeError>
200 SetValidationException(std::forward<ValidationExceptionT>(value));
201 return *this;
202 }
204
206
212 inline const BedrockRuntimeError& GetThrottlingException() const { return m_throttlingException; }
213 inline bool ThrottlingExceptionHasBeenSet() const { return m_throttlingExceptionHasBeenSet; }
214 template <typename ThrottlingExceptionT = BedrockRuntimeError>
216 m_throttlingExceptionHasBeenSet = true;
217 m_throttlingException = std::forward<ThrottlingExceptionT>(value);
218 }
219 template <typename ThrottlingExceptionT = BedrockRuntimeError>
221 SetThrottlingException(std::forward<ThrottlingExceptionT>(value));
222 return *this;
223 }
225
227
232 inline const BedrockRuntimeError& GetServiceUnavailableException() const { return m_serviceUnavailableException; }
233 inline bool ServiceUnavailableExceptionHasBeenSet() const { return m_serviceUnavailableExceptionHasBeenSet; }
234 template <typename ServiceUnavailableExceptionT = BedrockRuntimeError>
236 m_serviceUnavailableExceptionHasBeenSet = true;
237 m_serviceUnavailableException = std::forward<ServiceUnavailableExceptionT>(value);
238 }
239 template <typename ServiceUnavailableExceptionT = BedrockRuntimeError>
241 SetServiceUnavailableException(std::forward<ServiceUnavailableExceptionT>(value));
242 return *this;
243 }
245 private:
246 MessageStartEvent m_messageStart;
247
248 ContentBlockStartEvent m_contentBlockStart;
249
250 ContentBlockDeltaEvent m_contentBlockDelta;
251
252 ContentBlockStopEvent m_contentBlockStop;
253
254 MessageStopEvent m_messageStop;
255
257
258 BedrockRuntimeError m_internalServerException;
259
260 ModelStreamErrorException m_modelStreamErrorException;
261
262 BedrockRuntimeError m_validationException;
263
264 BedrockRuntimeError m_throttlingException;
265
266 BedrockRuntimeError m_serviceUnavailableException;
267 bool m_messageStartHasBeenSet = false;
268 bool m_contentBlockStartHasBeenSet = false;
269 bool m_contentBlockDeltaHasBeenSet = false;
270 bool m_contentBlockStopHasBeenSet = false;
271 bool m_messageStopHasBeenSet = false;
272 bool m_metadataHasBeenSet = false;
273 bool m_internalServerExceptionHasBeenSet = false;
274 bool m_modelStreamErrorExceptionHasBeenSet = false;
275 bool m_validationExceptionHasBeenSet = false;
276 bool m_throttlingExceptionHasBeenSet = false;
277 bool m_serviceUnavailableExceptionHasBeenSet = false;
278};
279
280} // namespace Model
281} // namespace BedrockRuntime
282} // namespace Aws
void SetContentBlockDelta(ContentBlockDeltaT &&value)
AWS_BEDROCKRUNTIME_API ConverseStreamOutput(Aws::Utils::Json::JsonView jsonValue)
AWS_BEDROCKRUNTIME_API ConverseStreamOutput & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetContentBlockStart(ContentBlockStartT &&value)
const ContentBlockDeltaEvent & GetContentBlockDelta() const
ConverseStreamOutput & WithMetadata(MetadataT &&value)
ConverseStreamOutput & WithValidationException(ValidationExceptionT &&value)
ConverseStreamOutput & WithServiceUnavailableException(ServiceUnavailableExceptionT &&value)
ConverseStreamOutput & WithContentBlockStop(ContentBlockStopT &&value)
const MessageStartEvent & GetMessageStart() const
ConverseStreamOutput & WithMessageStart(MessageStartT &&value)
const BedrockRuntimeError & GetThrottlingException() const
const ConverseStreamMetadataEvent & GetMetadata() const
ConverseStreamOutput & WithContentBlockDelta(ContentBlockDeltaT &&value)
ConverseStreamOutput & WithContentBlockStart(ContentBlockStartT &&value)
AWS_BEDROCKRUNTIME_API ConverseStreamOutput()=default
const BedrockRuntimeError & GetValidationException() const
void SetModelStreamErrorException(ModelStreamErrorExceptionT &&value)
void SetServiceUnavailableException(ServiceUnavailableExceptionT &&value)
const ContentBlockStopEvent & GetContentBlockStop() const
ConverseStreamOutput & WithModelStreamErrorException(ModelStreamErrorExceptionT &&value)
const ContentBlockStartEvent & GetContentBlockStart() const
const BedrockRuntimeError & GetInternalServerException() const
void SetThrottlingException(ThrottlingExceptionT &&value)
const ModelStreamErrorException & GetModelStreamErrorException() const
ConverseStreamOutput & WithMessageStop(MessageStopT &&value)
const BedrockRuntimeError & GetServiceUnavailableException() const
void SetInternalServerException(InternalServerExceptionT &&value)
ConverseStreamOutput & WithInternalServerException(InternalServerExceptionT &&value)
void SetValidationException(ValidationExceptionT &&value)
ConverseStreamOutput & WithThrottlingException(ThrottlingExceptionT &&value)
AWS_BEDROCKRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const
std::shared_ptr< T > MakeShared(const char *allocationTag, ArgTypes &&... args)
Aws::Utils::Json::JsonValue JsonValue