AWS SDK for C++

AWS SDK for C++ Version 1.11.440

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/InternalServerException.h>
10#include <aws/bedrock-runtime/model/ModelStreamErrorException.h>
11#include <aws/bedrock-runtime/model/ValidationException.h>
12#include <aws/bedrock-runtime/model/ThrottlingException.h>
13#include <aws/bedrock-runtime/model/ModelTimeoutException.h>
14#include <aws/bedrock-runtime/model/ServiceUnavailableException.h>
15#include <utility>
16
17namespace Aws
18{
19namespace Utils
20{
21namespace Json
22{
23 class JsonValue;
24 class JsonView;
25} // namespace Json
26} // namespace Utils
27namespace BedrockRuntime
28{
29namespace Model
30{
31
38 {
39 public:
40 AWS_BEDROCKRUNTIME_API ResponseStream();
41 AWS_BEDROCKRUNTIME_API ResponseStream(Aws::Utils::Json::JsonView jsonValue);
42 AWS_BEDROCKRUNTIME_API ResponseStream& operator=(Aws::Utils::Json::JsonView jsonValue);
43 AWS_BEDROCKRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const;
44
45
47
50 inline const PayloadPart& GetChunk() const{ return m_chunk; }
51 inline bool ChunkHasBeenSet() const { return m_chunkHasBeenSet; }
52 inline void SetChunk(const PayloadPart& value) { m_chunkHasBeenSet = true; m_chunk = value; }
53 inline void SetChunk(PayloadPart&& value) { m_chunkHasBeenSet = true; m_chunk = std::move(value); }
54 inline ResponseStream& WithChunk(const PayloadPart& value) { SetChunk(value); return *this;}
55 inline ResponseStream& WithChunk(PayloadPart&& value) { SetChunk(std::move(value)); return *this;}
57
59
62 inline const InternalServerException& GetInternalServerException() const{ return m_internalServerException; }
63 inline bool InternalServerExceptionHasBeenSet() const { return m_internalServerExceptionHasBeenSet; }
64 inline void SetInternalServerException(const InternalServerException& value) { m_internalServerExceptionHasBeenSet = true; m_internalServerException = value; }
65 inline void SetInternalServerException(InternalServerException&& value) { m_internalServerExceptionHasBeenSet = true; m_internalServerException = std::move(value); }
66 inline ResponseStream& WithInternalServerException(const InternalServerException& value) { SetInternalServerException(value); return *this;}
67 inline ResponseStream& WithInternalServerException(InternalServerException&& value) { SetInternalServerException(std::move(value)); return *this;}
69
71
74 inline const ModelStreamErrorException& GetModelStreamErrorException() const{ return m_modelStreamErrorException; }
75 inline bool ModelStreamErrorExceptionHasBeenSet() const { return m_modelStreamErrorExceptionHasBeenSet; }
76 inline void SetModelStreamErrorException(const ModelStreamErrorException& value) { m_modelStreamErrorExceptionHasBeenSet = true; m_modelStreamErrorException = value; }
77 inline void SetModelStreamErrorException(ModelStreamErrorException&& value) { m_modelStreamErrorExceptionHasBeenSet = true; m_modelStreamErrorException = std::move(value); }
81
83
87 inline const ValidationException& GetValidationException() const{ return m_validationException; }
88 inline bool ValidationExceptionHasBeenSet() const { return m_validationExceptionHasBeenSet; }
89 inline void SetValidationException(const ValidationException& value) { m_validationExceptionHasBeenSet = true; m_validationException = value; }
90 inline void SetValidationException(ValidationException&& value) { m_validationExceptionHasBeenSet = true; m_validationException = std::move(value); }
91 inline ResponseStream& WithValidationException(const ValidationException& value) { SetValidationException(value); return *this;}
92 inline ResponseStream& WithValidationException(ValidationException&& value) { SetValidationException(std::move(value)); return *this;}
94
96
102 inline const ThrottlingException& GetThrottlingException() const{ return m_throttlingException; }
103 inline bool ThrottlingExceptionHasBeenSet() const { return m_throttlingExceptionHasBeenSet; }
104 inline void SetThrottlingException(const ThrottlingException& value) { m_throttlingExceptionHasBeenSet = true; m_throttlingException = value; }
105 inline void SetThrottlingException(ThrottlingException&& value) { m_throttlingExceptionHasBeenSet = true; m_throttlingException = std::move(value); }
106 inline ResponseStream& WithThrottlingException(const ThrottlingException& value) { SetThrottlingException(value); return *this;}
107 inline ResponseStream& WithThrottlingException(ThrottlingException&& value) { SetThrottlingException(std::move(value)); return *this;}
109
111
115 inline const ModelTimeoutException& GetModelTimeoutException() const{ return m_modelTimeoutException; }
116 inline bool ModelTimeoutExceptionHasBeenSet() const { return m_modelTimeoutExceptionHasBeenSet; }
117 inline void SetModelTimeoutException(const ModelTimeoutException& value) { m_modelTimeoutExceptionHasBeenSet = true; m_modelTimeoutException = value; }
118 inline void SetModelTimeoutException(ModelTimeoutException&& value) { m_modelTimeoutExceptionHasBeenSet = true; m_modelTimeoutException = std::move(value); }
119 inline ResponseStream& WithModelTimeoutException(const ModelTimeoutException& value) { SetModelTimeoutException(value); return *this;}
120 inline ResponseStream& WithModelTimeoutException(ModelTimeoutException&& value) { SetModelTimeoutException(std::move(value)); return *this;}
122
124
125 inline const ServiceUnavailableException& GetServiceUnavailableException() const{ return m_serviceUnavailableException; }
126 inline bool ServiceUnavailableExceptionHasBeenSet() const { return m_serviceUnavailableExceptionHasBeenSet; }
127 inline void SetServiceUnavailableException(const ServiceUnavailableException& value) { m_serviceUnavailableExceptionHasBeenSet = true; m_serviceUnavailableException = value; }
128 inline void SetServiceUnavailableException(ServiceUnavailableException&& value) { m_serviceUnavailableExceptionHasBeenSet = true; m_serviceUnavailableException = std::move(value); }
129 inline ResponseStream& WithServiceUnavailableException(const ServiceUnavailableException& value) { SetServiceUnavailableException(value); return *this;}
130 inline ResponseStream& WithServiceUnavailableException(ServiceUnavailableException&& value) { SetServiceUnavailableException(std::move(value)); return *this;}
132 private:
133
134 PayloadPart m_chunk;
135 bool m_chunkHasBeenSet = false;
136
137 InternalServerException m_internalServerException;
138 bool m_internalServerExceptionHasBeenSet = false;
139
140 ModelStreamErrorException m_modelStreamErrorException;
141 bool m_modelStreamErrorExceptionHasBeenSet = false;
142
143 ValidationException m_validationException;
144 bool m_validationExceptionHasBeenSet = false;
145
146 ThrottlingException m_throttlingException;
147 bool m_throttlingExceptionHasBeenSet = false;
148
149 ModelTimeoutException m_modelTimeoutException;
150 bool m_modelTimeoutExceptionHasBeenSet = false;
151
152 ServiceUnavailableException m_serviceUnavailableException;
153 bool m_serviceUnavailableExceptionHasBeenSet = false;
154 };
155
156} // namespace Model
157} // namespace BedrockRuntime
158} // namespace Aws
void SetServiceUnavailableException(const ServiceUnavailableException &value)
void SetModelTimeoutException(ModelTimeoutException &&value)
AWS_BEDROCKRUNTIME_API ResponseStream & operator=(Aws::Utils::Json::JsonView jsonValue)
ResponseStream & WithChunk(PayloadPart &&value)
void SetChunk(const PayloadPart &value)
ResponseStream & WithInternalServerException(const InternalServerException &value)
ResponseStream & WithChunk(const PayloadPart &value)
void SetValidationException(ValidationException &&value)
ResponseStream & WithModelStreamErrorException(ModelStreamErrorException &&value)
const ValidationException & GetValidationException() const
void SetModelStreamErrorException(const ModelStreamErrorException &value)
void SetServiceUnavailableException(ServiceUnavailableException &&value)
const ThrottlingException & GetThrottlingException() const
void SetModelStreamErrorException(ModelStreamErrorException &&value)
ResponseStream & WithInternalServerException(InternalServerException &&value)
ResponseStream & WithModelStreamErrorException(const ModelStreamErrorException &value)
ResponseStream & WithValidationException(ValidationException &&value)
const InternalServerException & GetInternalServerException() const
ResponseStream & WithThrottlingException(const ThrottlingException &value)
void SetModelTimeoutException(const ModelTimeoutException &value)
ResponseStream & WithServiceUnavailableException(const ServiceUnavailableException &value)
ResponseStream & WithModelTimeoutException(const ModelTimeoutException &value)
void SetInternalServerException(InternalServerException &&value)
const ServiceUnavailableException & GetServiceUnavailableException() const
void SetThrottlingException(ThrottlingException &&value)
AWS_BEDROCKRUNTIME_API ResponseStream(Aws::Utils::Json::JsonView jsonValue)
AWS_BEDROCKRUNTIME_API ResponseStream()
void SetValidationException(const ValidationException &value)
void SetThrottlingException(const ThrottlingException &value)
const ModelTimeoutException & GetModelTimeoutException() const
AWS_BEDROCKRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const
ResponseStream & WithModelTimeoutException(ModelTimeoutException &&value)
void SetInternalServerException(const InternalServerException &value)
ResponseStream & WithThrottlingException(ThrottlingException &&value)
const ModelStreamErrorException & GetModelStreamErrorException() const
ResponseStream & WithServiceUnavailableException(ServiceUnavailableException &&value)
ResponseStream & WithValidationException(const ValidationException &value)
Aws::Utils::Json::JsonValue JsonValue