AWS SDK for C++

AWS SDK for C++ Version 1.11.746

Loading...
Searching...
No Matches
ResponseStream.h
1
6#pragma once
7#include <aws/bedrock-runtime/BedrockRuntime_EXPORTS.h>
8#include <aws/bedrock-runtime/model/ModelStreamErrorException.h>
9#include <aws/bedrock-runtime/model/PayloadPart.h>
10
11#include <utility>
12
13namespace Aws {
14namespace Utils {
15namespace Json {
16class JsonValue;
17class JsonView;
18} // namespace Json
19} // namespace Utils
20namespace BedrockRuntime {
21namespace Model {
22
29 public:
30 AWS_BEDROCKRUNTIME_API ResponseStream() = default;
33 AWS_BEDROCKRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const;
34
36
39 inline const PayloadPart& GetChunk() const { return m_chunk; }
40 inline bool ChunkHasBeenSet() const { return m_chunkHasBeenSet; }
41 template <typename ChunkT = PayloadPart>
42 void SetChunk(ChunkT&& value) {
43 m_chunkHasBeenSet = true;
44 m_chunk = std::forward<ChunkT>(value);
45 }
46 template <typename ChunkT = PayloadPart>
48 SetChunk(std::forward<ChunkT>(value));
49 return *this;
50 }
52
54
57 inline const BedrockRuntimeError& GetInternalServerException() const { return m_internalServerException; }
58 inline bool InternalServerExceptionHasBeenSet() const { return m_internalServerExceptionHasBeenSet; }
59 template <typename InternalServerExceptionT = BedrockRuntimeError>
61 m_internalServerExceptionHasBeenSet = true;
62 m_internalServerException = std::forward<InternalServerExceptionT>(value);
63 }
64 template <typename InternalServerExceptionT = BedrockRuntimeError>
66 SetInternalServerException(std::forward<InternalServerExceptionT>(value));
67 return *this;
68 }
70
72
75 inline const ModelStreamErrorException& GetModelStreamErrorException() const { return m_modelStreamErrorException; }
76 inline bool ModelStreamErrorExceptionHasBeenSet() const { return m_modelStreamErrorExceptionHasBeenSet; }
77 template <typename ModelStreamErrorExceptionT = ModelStreamErrorException>
79 m_modelStreamErrorExceptionHasBeenSet = true;
80 m_modelStreamErrorException = std::forward<ModelStreamErrorExceptionT>(value);
81 }
82 template <typename ModelStreamErrorExceptionT = ModelStreamErrorException>
84 SetModelStreamErrorException(std::forward<ModelStreamErrorExceptionT>(value));
85 return *this;
86 }
88
90
94 inline const BedrockRuntimeError& GetValidationException() const { return m_validationException; }
95 inline bool ValidationExceptionHasBeenSet() const { return m_validationExceptionHasBeenSet; }
96 template <typename ValidationExceptionT = BedrockRuntimeError>
98 m_validationExceptionHasBeenSet = true;
99 m_validationException = std::forward<ValidationExceptionT>(value);
100 }
101 template <typename ValidationExceptionT = BedrockRuntimeError>
103 SetValidationException(std::forward<ValidationExceptionT>(value));
104 return *this;
105 }
107
109
115 inline const BedrockRuntimeError& GetThrottlingException() const { return m_throttlingException; }
116 inline bool ThrottlingExceptionHasBeenSet() const { return m_throttlingExceptionHasBeenSet; }
117 template <typename ThrottlingExceptionT = BedrockRuntimeError>
119 m_throttlingExceptionHasBeenSet = true;
120 m_throttlingException = std::forward<ThrottlingExceptionT>(value);
121 }
122 template <typename ThrottlingExceptionT = BedrockRuntimeError>
124 SetThrottlingException(std::forward<ThrottlingExceptionT>(value));
125 return *this;
126 }
128
130
134 inline const BedrockRuntimeError& GetModelTimeoutException() const { return m_modelTimeoutException; }
135 inline bool ModelTimeoutExceptionHasBeenSet() const { return m_modelTimeoutExceptionHasBeenSet; }
136 template <typename ModelTimeoutExceptionT = BedrockRuntimeError>
138 m_modelTimeoutExceptionHasBeenSet = true;
139 m_modelTimeoutException = std::forward<ModelTimeoutExceptionT>(value);
140 }
141 template <typename ModelTimeoutExceptionT = BedrockRuntimeError>
143 SetModelTimeoutException(std::forward<ModelTimeoutExceptionT>(value));
144 return *this;
145 }
147
149
152 inline const BedrockRuntimeError& GetServiceUnavailableException() const { return m_serviceUnavailableException; }
153 inline bool ServiceUnavailableExceptionHasBeenSet() const { return m_serviceUnavailableExceptionHasBeenSet; }
154 template <typename ServiceUnavailableExceptionT = BedrockRuntimeError>
156 m_serviceUnavailableExceptionHasBeenSet = true;
157 m_serviceUnavailableException = std::forward<ServiceUnavailableExceptionT>(value);
158 }
159 template <typename ServiceUnavailableExceptionT = BedrockRuntimeError>
161 SetServiceUnavailableException(std::forward<ServiceUnavailableExceptionT>(value));
162 return *this;
163 }
165 private:
166 PayloadPart m_chunk;
167
168 BedrockRuntimeError m_internalServerException;
169
170 ModelStreamErrorException m_modelStreamErrorException;
171
172 BedrockRuntimeError m_validationException;
173
174 BedrockRuntimeError m_throttlingException;
175
176 BedrockRuntimeError m_modelTimeoutException;
177
178 BedrockRuntimeError m_serviceUnavailableException;
179 bool m_chunkHasBeenSet = false;
180 bool m_internalServerExceptionHasBeenSet = false;
181 bool m_modelStreamErrorExceptionHasBeenSet = false;
182 bool m_validationExceptionHasBeenSet = false;
183 bool m_throttlingExceptionHasBeenSet = false;
184 bool m_modelTimeoutExceptionHasBeenSet = false;
185 bool m_serviceUnavailableExceptionHasBeenSet = false;
186};
187
188} // namespace Model
189} // namespace BedrockRuntime
190} // namespace Aws
const BedrockRuntimeError & GetModelTimeoutException() const
ResponseStream & WithModelTimeoutException(ModelTimeoutExceptionT &&value)
AWS_BEDROCKRUNTIME_API ResponseStream & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetModelStreamErrorException(ModelStreamErrorExceptionT &&value)
const BedrockRuntimeError & GetValidationException() const
ResponseStream & WithModelStreamErrorException(ModelStreamErrorExceptionT &&value)
void SetModelTimeoutException(ModelTimeoutExceptionT &&value)
AWS_BEDROCKRUNTIME_API ResponseStream()=default
void SetValidationException(ValidationExceptionT &&value)
ResponseStream & WithChunk(ChunkT &&value)
void SetServiceUnavailableException(ServiceUnavailableExceptionT &&value)
ResponseStream & WithInternalServerException(InternalServerExceptionT &&value)
ResponseStream & WithValidationException(ValidationExceptionT &&value)
void SetThrottlingException(ThrottlingExceptionT &&value)
AWS_BEDROCKRUNTIME_API ResponseStream(Aws::Utils::Json::JsonView jsonValue)
const BedrockRuntimeError & GetServiceUnavailableException() const
AWS_BEDROCKRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const
void SetInternalServerException(InternalServerExceptionT &&value)
const BedrockRuntimeError & GetThrottlingException() const
const ModelStreamErrorException & GetModelStreamErrorException() const
ResponseStream & WithThrottlingException(ThrottlingExceptionT &&value)
ResponseStream & WithServiceUnavailableException(ServiceUnavailableExceptionT &&value)
const BedrockRuntimeError & GetInternalServerException() const
std::shared_ptr< T > MakeShared(const char *allocationTag, ArgTypes &&... args)
Aws::Utils::Json::JsonValue JsonValue