AWS SDK for C++

AWS SDK for C++ Version 1.11.610

Loading...
Searching...
No Matches
ResponseStream.h
1
6#pragma once
7#include <aws/bedrock-runtime/BedrockRuntime_EXPORTS.h>
8#include <aws/bedrock-runtime/model/PayloadPart.h>
9#include <aws/bedrock-runtime/model/ModelStreamErrorException.h>
10#include <utility>
11
12namespace Aws
13{
14namespace Utils
15{
16namespace Json
17{
18 class JsonValue;
19 class JsonView;
20} // namespace Json
21} // namespace Utils
22namespace BedrockRuntime
23{
24namespace Model
25{
26
33 {
34 public:
35 AWS_BEDROCKRUNTIME_API ResponseStream() = default;
36 AWS_BEDROCKRUNTIME_API ResponseStream(Aws::Utils::Json::JsonView jsonValue);
37 AWS_BEDROCKRUNTIME_API ResponseStream& operator=(Aws::Utils::Json::JsonView jsonValue);
38 AWS_BEDROCKRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const;
39
40
42
45 inline const PayloadPart& GetChunk() const { return m_chunk; }
46 inline bool ChunkHasBeenSet() const { return m_chunkHasBeenSet; }
47 template<typename ChunkT = PayloadPart>
48 void SetChunk(ChunkT&& value) { m_chunkHasBeenSet = true; m_chunk = std::forward<ChunkT>(value); }
49 template<typename ChunkT = PayloadPart>
50 ResponseStream& WithChunk(ChunkT&& value) { SetChunk(std::forward<ChunkT>(value)); return *this;}
52
54
57 inline const BedrockRuntimeError& GetInternalServerException() const { return m_internalServerException; }
58 inline bool InternalServerExceptionHasBeenSet() const { return m_internalServerExceptionHasBeenSet; }
59 template<typename InternalServerExceptionT = BedrockRuntimeError>
60 void SetInternalServerException(InternalServerExceptionT&& value) { m_internalServerExceptionHasBeenSet = true; m_internalServerException = std::forward<InternalServerExceptionT>(value); }
61 template<typename InternalServerExceptionT = BedrockRuntimeError>
62 ResponseStream& WithInternalServerException(InternalServerExceptionT&& value) { SetInternalServerException(std::forward<InternalServerExceptionT>(value)); return *this;}
64
66
69 inline const ModelStreamErrorException& GetModelStreamErrorException() const { return m_modelStreamErrorException; }
70 inline bool ModelStreamErrorExceptionHasBeenSet() const { return m_modelStreamErrorExceptionHasBeenSet; }
71 template<typename ModelStreamErrorExceptionT = ModelStreamErrorException>
72 void SetModelStreamErrorException(ModelStreamErrorExceptionT&& value) { m_modelStreamErrorExceptionHasBeenSet = true; m_modelStreamErrorException = std::forward<ModelStreamErrorExceptionT>(value); }
73 template<typename ModelStreamErrorExceptionT = ModelStreamErrorException>
74 ResponseStream& WithModelStreamErrorException(ModelStreamErrorExceptionT&& value) { SetModelStreamErrorException(std::forward<ModelStreamErrorExceptionT>(value)); return *this;}
76
78
82 inline const BedrockRuntimeError& GetValidationException() const { return m_validationException; }
83 inline bool ValidationExceptionHasBeenSet() const { return m_validationExceptionHasBeenSet; }
84 template<typename ValidationExceptionT = BedrockRuntimeError>
85 void SetValidationException(ValidationExceptionT&& value) { m_validationExceptionHasBeenSet = true; m_validationException = std::forward<ValidationExceptionT>(value); }
86 template<typename ValidationExceptionT = BedrockRuntimeError>
87 ResponseStream& WithValidationException(ValidationExceptionT&& value) { SetValidationException(std::forward<ValidationExceptionT>(value)); return *this;}
89
91
97 inline const BedrockRuntimeError& GetThrottlingException() const { return m_throttlingException; }
98 inline bool ThrottlingExceptionHasBeenSet() const { return m_throttlingExceptionHasBeenSet; }
99 template<typename ThrottlingExceptionT = BedrockRuntimeError>
100 void SetThrottlingException(ThrottlingExceptionT&& value) { m_throttlingExceptionHasBeenSet = true; m_throttlingException = std::forward<ThrottlingExceptionT>(value); }
101 template<typename ThrottlingExceptionT = BedrockRuntimeError>
102 ResponseStream& WithThrottlingException(ThrottlingExceptionT&& value) { SetThrottlingException(std::forward<ThrottlingExceptionT>(value)); return *this;}
104
106
110 inline const BedrockRuntimeError& GetModelTimeoutException() const { return m_modelTimeoutException; }
111 inline bool ModelTimeoutExceptionHasBeenSet() const { return m_modelTimeoutExceptionHasBeenSet; }
112 template<typename ModelTimeoutExceptionT = BedrockRuntimeError>
113 void SetModelTimeoutException(ModelTimeoutExceptionT&& value) { m_modelTimeoutExceptionHasBeenSet = true; m_modelTimeoutException = std::forward<ModelTimeoutExceptionT>(value); }
114 template<typename ModelTimeoutExceptionT = BedrockRuntimeError>
115 ResponseStream& WithModelTimeoutException(ModelTimeoutExceptionT&& value) { SetModelTimeoutException(std::forward<ModelTimeoutExceptionT>(value)); return *this;}
117
119
122 inline const BedrockRuntimeError& GetServiceUnavailableException() const { return m_serviceUnavailableException; }
123 inline bool ServiceUnavailableExceptionHasBeenSet() const { return m_serviceUnavailableExceptionHasBeenSet; }
124 template<typename ServiceUnavailableExceptionT = BedrockRuntimeError>
125 void SetServiceUnavailableException(ServiceUnavailableExceptionT&& value) { m_serviceUnavailableExceptionHasBeenSet = true; m_serviceUnavailableException = std::forward<ServiceUnavailableExceptionT>(value); }
126 template<typename ServiceUnavailableExceptionT = BedrockRuntimeError>
127 ResponseStream& WithServiceUnavailableException(ServiceUnavailableExceptionT&& value) { SetServiceUnavailableException(std::forward<ServiceUnavailableExceptionT>(value)); return *this;}
129 private:
130
131 PayloadPart m_chunk;
132 bool m_chunkHasBeenSet = false;
133
134 BedrockRuntimeError m_internalServerException;
135 bool m_internalServerExceptionHasBeenSet = false;
136
137 ModelStreamErrorException m_modelStreamErrorException;
138 bool m_modelStreamErrorExceptionHasBeenSet = false;
139
140 BedrockRuntimeError m_validationException;
141 bool m_validationExceptionHasBeenSet = false;
142
143 BedrockRuntimeError m_throttlingException;
144 bool m_throttlingExceptionHasBeenSet = false;
145
146 BedrockRuntimeError m_modelTimeoutException;
147 bool m_modelTimeoutExceptionHasBeenSet = false;
148
149 BedrockRuntimeError m_serviceUnavailableException;
150 bool m_serviceUnavailableExceptionHasBeenSet = false;
151 };
152
153} // namespace Model
154} // namespace BedrockRuntime
155} // 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
Aws::Utils::Json::JsonValue JsonValue